summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Bar-Lev <alonbl@gentoo.org>2006-10-30 21:31:16 +0000
committerAlon Bar-Lev <alonbl@gentoo.org>2006-10-30 21:31:16 +0000
commite8d07c2ea0ffb824bee2c053b446e58e0a5ff7da (patch)
treee71c71a3f5a581ed6dd5202ce56fb46d01bb205a /net-wireless/aircrack-ng/files
parentAdded new revision for testing which uses the brand-spankin-new games-mods.ec... (diff)
downloadgentoo-2-e8d07c2ea0ffb824bee2c053b446e58e0a5ff7da.tar.gz
gentoo-2-e8d07c2ea0ffb824bee2c053b446e58e0a5ff7da.tar.bz2
gentoo-2-e8d07c2ea0ffb824bee2c053b446e58e0a5ff7da.zip
Replace interactive shell with simple C program, since interactive shell is not always interactive (bug#148913)
(Portage version: 2.1.1-r1)
Diffstat (limited to 'net-wireless/aircrack-ng/files')
-rw-r--r--net-wireless/aircrack-ng/files/process-group-leader.c26
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;
+}
+