File: setsid.c

package info (click to toggle)
mobyle 1.5.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 8,272 kB
  • ctags: 2,745
  • sloc: python: 22,649; sh: 57; makefile: 31; xml: 6; ansic: 5
file content (12 lines) | stat: -rw-r--r-- 192 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12

#include <unistd.h>

int main(int argc, char **argv) {

  /* Make this process a group leader */
  (void)setsid();

  /* Execute the real command */
  execvp(argv[1], argv+1);

  return 1; }