diff options
| author | pgoyette <pgoyette@NetBSD.org> | 2013-02-19 22:44:27 +0000 |
|---|---|---|
| committer | pgoyette <pgoyette@NetBSD.org> | 2013-02-19 22:44:27 +0000 |
| commit | c6c2c07aa6d1341b2eb5bee3720378634fba4dbe (patch) | |
| tree | 971b9aea1902ce91f7c92c77e58da32b487c0ceb /tests/kernel | |
| parent | 3caf80e365a54c97590e97b925fe49f445a80b6d (diff) | |
Replace printf() in child process with a simple write(STDERR_FILNO,...)
Thanks, Joerg.
Diffstat (limited to 'tests/kernel')
| -rw-r--r-- | tests/kernel/t_lockf.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/kernel/t_lockf.c b/tests/kernel/t_lockf.c index 705dd96cce6..bb69f842b2e 100644 --- a/tests/kernel/t_lockf.c +++ b/tests/kernel/t_lockf.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_lockf.c,v 1.6 2013/02/19 04:58:40 pgoyette Exp $ */ +/* $NetBSD: t_lockf.c,v 1.7 2013/02/19 22:44:27 pgoyette Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -123,6 +123,7 @@ ATF_TC_BODY(randlock, tc) pid_t *pid; int status; char pipe_in, pipe_out; + const char *pipe_errmsg = "child: pipe write failed\n"; (void)unlink(lockfile); @@ -145,8 +146,8 @@ ATF_TC_BODY(randlock, tc) switch (pid[i]) { case 0: if (write(pipe_fd[1], &pipe_out, 1) != 1) - printf("write_pipe(%i): %s", i, - strerror(errno)); + write(STDERR_FILENO, pipe_errmsg, + __arraycount(pipe_errmsg)); else trylocks(i); _exit(0); |
