[PATCH] context: Check for errno == ECHILD instead of ESRCH after failed waitpid().

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When the specified pid no longer exists as a child of the process (since
it was already reaped by the SIGCHLD handler), errno is set to ECHILD, not
to ESRCH.
---
 src/pulse/context.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/pulse/context.c b/src/pulse/context.c
index c39cbe75..6adfc5a9 100644
--- a/src/pulse/context.c
+++ b/src/pulse/context.c
@@ -753,7 +753,7 @@ static int context_autospawn(pa_context *c) {
 
     if (r < 0) {
 
-        if (errno != ESRCH) {
+        if (errno != ECHILD) {
             pa_log(_("waitpid(): %s"), pa_cstrerror(errno));
             pa_context_fail(c, PA_ERR_INTERNAL);
             goto fail;
-- 
2.11.0



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux