From 54985b61cddbac2f31e13de8fb5deb7c81ff0776 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 28 Jul 2005 03:59:10 +0000 Subject: check the return value of the clone call too --- test/unistd/errno.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/unistd/errno.c b/test/unistd/errno.c index 746c21d89..cb082b890 100644 --- a/test/unistd/errno.c +++ b/test/unistd/errno.c @@ -17,9 +17,9 @@ int main(void) r_clone = clone(child_fn, NULL, (int) NULL, NULL); ret_errno = errno; - if (ret_errno != EINVAL) { - fprintf(stderr, "clone: res=%d (%d) errno=%d %m\n", - r_clone, (int) NULL, errno); + if (ret_errno != EINVAL || r_clone != -1) { + fprintf(stderr, "clone: res=%d (wanted -1) errno=%d (wanted %d)\n", + r_clone, errno, EINVAL); return 1; } -- cgit v1.2.3