summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-04-06 10:56:27 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-04-06 10:56:27 +0200
commit010060289a729dd930ac04b72237f0ca0db9ea1d (patch)
tree32774b23b653b9fd83fa3b83a3acc76f559f5b12
parent04b06af335bedcb651ccffd852863b7d17bf20dc (diff)
downloadrsyslog-010060289a729dd930ac04b72237f0ca0db9ea1d.tar.gz
rsyslog-010060289a729dd930ac04b72237f0ca0db9ea1d.tar.xz
rsyslog-010060289a729dd930ac04b72237f0ca0db9ea1d.zip
made sure udptester terminates only after rsyslgod it spawned
We noticed this race issue under Solaris (thanks to its different scheduler, I guess). In some cases, the previous instance of rsyslogd was not terminated, resulting in a failure on the next test. Now handled correctly.
-rw-r--r--tests/udptester.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/udptester.c b/tests/udptester.c
index ea642db6..a3c6658d 100644
--- a/tests/udptester.c
+++ b/tests/udptester.c
@@ -259,6 +259,7 @@ int main(int argc, char *argv[])
{
int fd;
pid_t pid;
+ int status;
int ret = 0;
char buf[4096];
char testcases[4096];
@@ -286,6 +287,7 @@ int main(int argc, char *argv[])
/* cleanup */
kill(pid, SIGTERM);
+ waitpid(pid, &status, 0); /* wait until instance terminates */
printf("End of udptester run.\n");
exit(ret);
}