add kflickr for kde-4.1
[ub0rlay.git] / net-wireless / aircrack-ng / files / process-group-leader.c
blob4abdcccf9dcd594de6163f99dda2935271301508
1 #include <unistd.h>
2 #include <sys/signal.h>
3 #include <sys/wait.h>
4 #include <stdlib.h>
6 int main (int argc, char *argv[]) {
7 pid_t pid;
9 signal (SIGQUIT, SIG_IGN);
10 signal (SIGTERM, SIG_IGN);
11 setpgid (0, 0);
13 pid=fork ();
14 if (pid == 0) {
15 int status;
16 wait (&status);
17 exit (WEXITSTATUS(status));
19 else {
20 execv (argv[1], &argv[1]);
21 exit (1);
24 return 0;