]> code.delx.au - pulseaudio/commitdiff
when killing gconf helper, loop over EINTR
authorLennart Poettering <lennart@poettering.net>
Wed, 1 Oct 2008 21:42:32 +0000 (23:42 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 1 Oct 2008 21:42:32 +0000 (23:42 +0200)
src/modules/gconf/module-gconf.c

index 6e8ab6eaf0e2efe3bb808b23247cc4fdcc102c11..845ede50bc781a787d9c9dcfc155d8e4e06b7b0f 100644 (file)
@@ -378,7 +378,16 @@ void pa__done(pa_module*m) {
 
     if (u->pid != (pid_t) -1) {
         kill(u->pid, SIGTERM);
-        waitpid(u->pid, NULL, 0);
+
+        for (;;) {
+            if (waitpid(u->pid, NULL, 0) >= 0)
+                break;
+
+            if (errno != EINTR) {
+                pa_log("waitpid() failed: %s", pa_cstrerror(errno));
+                break;
+            }
+        }
     }
 
     if (u->io_event)
@@ -387,7 +396,6 @@ void pa__done(pa_module*m) {
     if (u->fd >= 0)
         pa_close(u->fd);
 
-
     if (u->module_infos)
         pa_hashmap_free(u->module_infos, module_info_free, u);