Mercurial > hg > aboriginal
view sources/toys/mysetsid.c @ 791:b9fa1da23205
Remove patch that got committed upstream.
author | Rob Landley <rob@landley.net> |
---|---|
date | Mon, 06 Jul 2009 05:27:12 -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; }