summaryrefslogtreecommitdiff
path: root/plugins/dfinput
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/dfinput
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/dfinput')
-rw-r--r--plugins/dfinput/pad.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/plugins/dfinput/pad.c b/plugins/dfinput/pad.c
index 1074b9ae..d919ae39 100644
--- a/plugins/dfinput/pad.c
+++ b/plugins/dfinput/pad.c
@@ -651,18 +651,33 @@ void PADregisterVibration(void (*callback)(uint32_t, uint32_t)) {
#ifndef _MACOSX
long PADconfigure(void) {
- if (fork() == 0) {
- execl("cfg/cfgDFInput", "cfgDFInput", NULL);
+ int pid = fork();
+
+ if (pid == 0) {
+ if (fork() == 0) {
+ execl("cfg/cfgDFInput", "cfgDFInput", NULL);
+ }
exit(0);
+ } else if (pid > 0) {
+ waitpid(pid, NULL, 0);
}
+
return PSE_PAD_ERR_SUCCESS;
}
void PADabout(void) {
- if (fork() == 0) {
- execl("cfg/cfgDFInput", "cfgDFInput", "-about", NULL);
+ int pid = fork();
+
+ if (pid == 0) {
+ if (fork() == 0) {
+ execl("cfg/cfgDFInput", "cfgDFInput", "-about", NULL);
+ }
exit(0);
+ } else if (pid > 0) {
+ waitpid(pid, NULL, 0);
}
+
+ return PSE_PAD_ERR_SUCCESS;
}
#endif