diff options
Diffstat (limited to 'plugins/dfinput/pad.c')
| -rw-r--r-- | plugins/dfinput/pad.c | 23 |
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
|
