diff options
author | 2006-10-30 21:31:16 +0000 | |
---|---|---|
committer | 2006-10-30 21:31:16 +0000 | |
commit | 4e52068769b8517c061a98d2ec78d9d91af4078d (patch) | |
tree | 7c577cba34c1cf95c1c1df0a88fc0ba683bd7ed7 /net-wireless/aircrack-ng/files | |
parent | Added new revision for testing which uses the brand-spankin-new games-mods.ec... (diff) | |
download | historical-4e52068769b8517c061a98d2ec78d9d91af4078d.tar.gz historical-4e52068769b8517c061a98d2ec78d9d91af4078d.tar.bz2 historical-4e52068769b8517c061a98d2ec78d9d91af4078d.zip |
Replace interactive shell with simple C program, since interactive shell is not always interactive (bug#148913)
Package-Manager: portage-2.1.1-r1
Diffstat (limited to 'net-wireless/aircrack-ng/files')
-rw-r--r-- | net-wireless/aircrack-ng/files/process-group-leader.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/net-wireless/aircrack-ng/files/process-group-leader.c b/net-wireless/aircrack-ng/files/process-group-leader.c new file mode 100644 index 000000000000..4c5f1ad4d8f6 --- /dev/null +++ b/net-wireless/aircrack-ng/files/process-group-leader.c @@ -0,0 +1,26 @@ +#include <unistd.h> +#include <sys/signal.h> +#include <sys/wait.h> +#include <stdlib.h> + +int main (int argc, char *argv[]) { + pid_t pid; + + signal (SIGQUIT, SIG_IGN); + signal (SIGTERM, SIG_IGN); + setpgrp (); + + pid=fork (); + if (pid == 0) { + int status; + wait (&status); + exit (WEXITSTATUS(status)); + } + else { + execv (argv[1], &argv[1]); + exit (1); + } + + return 0; +} + |