summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Leonard <d@cvs.openbsd.org>2000-01-06 06:53:53 +0000
committerDavid Leonard <d@cvs.openbsd.org>2000-01-06 06:53:53 +0000
commit968e769c8bbe23bd6f7287f9caae63be8fa16676 (patch)
tree64fc41489b85f239946445c862672fe5fa95fb60 /lib
parentfd1c79d414930810d40331cea60519c81c7aca04 (diff)
cleanup
Diffstat (limited to 'lib')
-rw-r--r--lib/libc_r/TEST/test_fcntl.c11
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);
}
}