summaryrefslogtreecommitdiff
path: root/plugins/peopsxgl
diff options
context:
space:
mode:
authorSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2012-10-23 08:55:40 +0000
committerSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2012-10-23 08:55:40 +0000
commite8b7285da685866a373b1112115e6dc543991ca9 (patch)
treec0454aaafe66ae4be18effca5d95d5c0d594e0ba /plugins/peopsxgl
parentb2d8e7917684eb1cca4244d628e6769ba833144c (diff)
downloadpcsxr-e8b7285da685866a373b1112115e6dc543991ca9.tar.gz
Do not leave zombie process when running configure utilities.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@80664 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'plugins/peopsxgl')
-rw-r--r--plugins/peopsxgl/gpu.c27
1 files changed, 21 insertions, 6 deletions
diff --git a/plugins/peopsxgl/gpu.c b/plugins/peopsxgl/gpu.c
index 61daa891..36baa0c9 100644
--- a/plugins/peopsxgl/gpu.c
+++ b/plugins/peopsxgl/gpu.c
@@ -3012,27 +3012,42 @@ void StartCfgTool(char *arg) // linux: start external cfg tool
strcpy(cfg, "./cfgpeopsxgl");
if (stat(cfg, &buf) != -1) {
- if (fork() == 0) {
- execl(cfg, "cfgpeopsxgl", arg, NULL);
+ int pid = fork();
+ if (pid == 0) {
+ if (fork() == 0) {
+ execl(cfg, "cfgpeopsxgl", arg, NULL);
+ }
exit(0);
+ } else {
+ waitpid(pid, NULL, 0);
}
return;
}
strcpy(cfg, "./cfg/cfgpeopsxgl");
if (stat(cfg, &buf) != -1) {
- if (fork() == 0) {
- execl(cfg, "cfgpeopsxgl", arg, NULL);
+ int pid = fork();
+ if (pid == 0) {
+ if (fork() == 0) {
+ execl(cfg, "cfgpeopsxgl", arg, NULL);
+ }
exit(0);
+ } else {
+ waitpid(pid, NULL, 0);
}
return;
}
sprintf(cfg, "%s/.pcsxr/plugins/cfg/cfgpeopsxgl", getenv("HOME"));
if (stat(cfg, &buf) != -1) {
- if (fork() == 0) {
- execl(cfg, "cfgpeopsxgl", arg, NULL);
+ int pid = fork();
+ if (pid == 0) {
+ if (fork() == 0) {
+ execl(cfg, "cfgpeopsxgl", arg, NULL);
+ }
exit(0);
+ } else {
+ waitpid(pid, NULL, 0);
}
return;
}