Mercurial > hg > aboriginal
view sources/toys/mysetsid.c @ 728:14b9373956a7
Teach squashfs to create /dev/console and change default image time to squashfs.
author | Rob Landley <rob@landley.net> |
---|---|
date | Mon, 11 May 2009 01:06:39 -0500 |
parents | 428df726cf7f |
children |
line wrap: on
line source
#include <unistd.h> // This is a more thorough version of setsid, which sets up both a session // ID and a process group, and points the stdin signal handling to the new // process group. int main(int argc, char *argv[]) { setsid(); setpgid(0,0); tcsetpgrp(0, getpid()); if (argc>1) execvp(argv[1], argv+1); return 127; }