diff options
author | Robert Morris <[email protected]> | 2019-08-27 13:13:03 -0400 |
---|---|---|
committer | Robert Morris <[email protected]> | 2019-08-27 13:13:03 -0400 |
commit | 64b93d175ac6eb739036b394fbb0766fbf06f5b7 (patch) | |
tree | 7914971346f770276a307763449700353a5003c1 /user/forktest.c | |
parent | a3f6d9fd1e21a7339f2bc26f185f7d561bc370c4 (diff) | |
download | xv6-labs-64b93d175ac6eb739036b394fbb0766fbf06f5b7.tar.gz xv6-labs-64b93d175ac6eb739036b394fbb0766fbf06f5b7.tar.bz2 xv6-labs-64b93d175ac6eb739036b394fbb0766fbf06f5b7.zip |
user printf(1 -> printf(
Diffstat (limited to 'user/forktest.c')
-rw-r--r-- | user/forktest.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/user/forktest.c b/user/forktest.c index be4915e..fa072ca 100644 --- a/user/forktest.c +++ b/user/forktest.c @@ -8,9 +8,9 @@ #define N 1000 void -printf(int fd, const char *s, ...) +print(const char *s) { - write(fd, s, strlen(s)); + write(1, s, strlen(s)); } void @@ -18,7 +18,7 @@ forktest(void) { int n, pid; - printf(1, "fork test\n"); + print("fork test\n"); for(n=0; n<N; n++){ pid = fork(); @@ -29,23 +29,23 @@ forktest(void) } if(n == N){ - printf(1, "fork claimed to work N times!\n", N); + print("fork claimed to work N times!\n"); exit(); } for(; n > 0; n--){ if(wait() < 0){ - printf(1, "wait stopped early\n"); + print("wait stopped early\n"); exit(); } } if(wait() != -1){ - printf(1, "wait got too many\n"); + print("wait got too many\n"); exit(); } - printf(1, "fork test OK\n"); + print("fork test OK\n"); } int |