tFix for odd behaviour after fork() when using the SDL plugin. - vaccinewars - … | |
git clone git://src.adamsgaard.dk/vaccinewars | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 74b39dc9b927406a5023f1de4f4bacb98b03e4cc | |
parent 38ffefd3a56c63ece9ed2fe03e9d8371565cb3ae | |
Author: Ben Webb <[email protected]> | |
Date: Tue, 25 Jun 2002 10:31:21 +0000 | |
Fix for odd behaviour after fork() when using the SDL plugin. | |
Diffstat: | |
M src/gtkport/gtkport.c | 6 +++--- | |
1 file changed, 3 insertions(+), 3 deletions(-) | |
--- | |
diff --git a/src/gtkport/gtkport.c b/src/gtkport/gtkport.c | |
t@@ -5288,15 +5288,15 @@ static gboolean gtk_url_triggered(GtkWidget *widget, G… | |
/* Fork twice so that the spawned process gets init as its parent */ | |
pid = fork(); | |
if (pid > 0) { | |
- waitpid(-1, &status, WNOHANG); | |
+ wait(&status); | |
} else if (pid == 0) { | |
pid = fork(); | |
if (pid == 0) { | |
execv(bin, args); | |
g_print("dopewars: cannot execute %s\n", bin); | |
- exit(1); | |
+ _exit(1); | |
} else { | |
- exit(0); | |
+ _exit(0); | |
} | |
} | |
} |