diff options
Diffstat (limited to 'lib/libc_r')
-rw-r--r-- | lib/libc_r/TEST/test_fcntl.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/libc_r/TEST/test_fcntl.c b/lib/libc_r/TEST/test_fcntl.c index bfe38cb16ec..c501eb8b59c 100644 --- a/lib/libc_r/TEST/test_fcntl.c +++ b/lib/libc_r/TEST/test_fcntl.c @@ -1,10 +1,15 @@ +/* $OpenBSD: test_fcntl.c,v 1.3 2000/01/06 06:53:52 d Exp $ */ +/* + * Test fcntl() flag inheritance across a fork() + */ #include <stdio.h> #include <fcntl.h> #include "test.h" +int main() { - int flags, child; + int flags, newflags, child; CHECKe(flags = fcntl(0, F_GETFL)); printf("flags = %x\n", flags); @@ -20,8 +25,8 @@ main() } while(1){ - CHECKe(flags = fcntl(0, F_GETFL)); - printf ("parent %d flags = %x\n", child, flags); + CHECKe(newflags = fcntl(0, F_GETFL)); + printf ("parent %d flags = %x\n", child, newflags); sleep(1); } } |