From c568ca2932c0bd8a395fec516c49781b515b4776 Mon Sep 17 00:00:00 2001 From: Paul Sajna Date: Thu, 15 Mar 2018 16:18:35 -0700 Subject: [PATCH] test cleanup --- tests/waitpid.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tests/waitpid.c b/tests/waitpid.c index 79f9829207..c350e33c6f 100644 --- a/tests/waitpid.c +++ b/tests/waitpid.c @@ -5,12 +5,13 @@ int main(int argc, char** argv) { pid_t pid = fork(); if (pid == 0) { - // child - sleep(1); - exit(0); -} else { - // parent - int stat_loc; - waitpid(pid, &stat_loc, 0); + // child + sleep(1); + exit(0); + } else { + // parent + int stat_loc; + waitpid(pid, &stat_loc, 0); } + return 0; }