From 22fac72e1a45261c0089904718bd89a72cba3b68 Mon Sep 17 00:00:00 2001 From: freddyrios <70888589+freddyrios@users.noreply.github.com> Date: Wed, 24 Feb 2021 04:20:12 +0100 Subject: [PATCH] fixes WiringPi/WiringPi#100 (#101) Replaces a bare wait() with waitpid() to only wait on the just-forked process. --- wiringPi/wiringPi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiringPi/wiringPi.c b/wiringPi/wiringPi.c index 85aedf6..b311165 100644 --- a/wiringPi/wiringPi.c +++ b/wiringPi/wiringPi.c @@ -2049,7 +2049,7 @@ int wiringPiISR (int pin, int mode, void (*function)(void)) return wiringPiFailure (WPI_FATAL, "wiringPiISR: Can't find gpio program\n") ; } else // Parent, wait - wait (NULL) ; + waitpid (pid, NULL, 0) ; } // Now pre-open the /sys/class node - but it may already be open if