diff options
Diffstat (limited to 'web/attachments/144118-nagios-plugins-1.4.1-waitpid.patch')
-rw-r--r-- | web/attachments/144118-nagios-plugins-1.4.1-waitpid.patch | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/web/attachments/144118-nagios-plugins-1.4.1-waitpid.patch b/web/attachments/144118-nagios-plugins-1.4.1-waitpid.patch new file mode 100644 index 0000000..331da4b --- /dev/null +++ b/web/attachments/144118-nagios-plugins-1.4.1-waitpid.patch | |||
@@ -0,0 +1,16 @@ | |||
1 | --- nagios-plugins-1.4.1/plugins/popen.c.orig 2005-08-02 13:44:47.631761141 +0200 | ||
2 | +++ nagios-plugins-1.4.1/plugins/popen.c 2005-08-02 13:52:24.589616713 +0200 | ||
3 | @@ -221,8 +221,13 @@ | ||
4 | return (1); | ||
5 | |||
6 | while (waitpid (pid, &status, 0) < 0) | ||
7 | + { | ||
8 | + if (errno == ECHILD) | ||
9 | + return (0); /* Child has already exited */ | ||
10 | + | ||
11 | if (errno != EINTR) | ||
12 | return (1); /* error other than EINTR from waitpid() */ | ||
13 | + } | ||
14 | |||
15 | if (WIFEXITED (status)) | ||
16 | return (WEXITSTATUS (status)); /* return child's termination status */ | ||