From mboxrd@z Thu Jan 1 00:00:00 1970 From: dgoulet@efficios.com (David Goulet) Date: Wed, 26 Feb 2014 13:38:36 -0500 Subject: [lttng-dev] [PATCH lttng-tools] Tests fix: Missing waitpid in fork test In-Reply-To: <1393430217-12953-1-git-send-email-jeremie.galarneau@efficios.com> References: <1393430217-12953-1-git-send-email-jeremie.galarneau@efficios.com> Message-ID: <20140226183836.GC7356@thessa> Merged! On 26 Feb (10:56:57), J?r?mie Galarneau wrote: > Signed-off-by: J?r?mie Galarneau > --- > tests/regression/ust/fork/fork.c | 14 +++++++++++--- > 1 file changed, 11 insertions(+), 3 deletions(-) > > diff --git a/tests/regression/ust/fork/fork.c b/tests/regression/ust/fork/fork.c > index 744e920..7df982b 100644 > --- a/tests/regression/ust/fork/fork.c > +++ b/tests/regression/ust/fork/fork.c > @@ -20,6 +20,7 @@ > #include > #include > #include > +#include > #include > > #define TRACEPOINT_DEFINE > @@ -51,12 +52,19 @@ int main(int argc, char **argv, char *env[]) > result = execve(argv[1], args, env); > if (result == -1) { > perror("execve"); > - return 1; > + result = 1; > + goto end; > } > } else { > printf("child_pid %d\n", result); > tracepoint(ust_tests_fork, after_fork_parent, getpid()); > + if (waitpid(result, NULL, 0) < 0) { > + perror("waitpid"); > + result = 1; > + goto end; > + } > } > - > - return 0; > + result = 0; > +end: > + return result; > } > -- > 1.9.0 > > > _______________________________________________ > lttng-dev mailing list > lttng-dev at lists.lttng.org > http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 603 bytes Desc: Digital signature URL: