Skip to content
Snippets Groups Projects
Commit 439ffb73 authored by rswindell's avatar rswindell
Browse files

Subsequent lock of same region should fail.

parent 87dd54d8
No related branches found
No related tags found
No related merge requests found
...@@ -64,6 +64,7 @@ int main() ...@@ -64,6 +64,7 @@ int main()
else else
SLEEP(1); SLEEP(1);
} }
printf("Waiting for all sopen_child_threads to close...\n");
SLEEP(5000); /* wait for all threads to quit */ SLEEP(5000); /* wait for all threads to quit */
/* Exclusive sopen test */ /* Exclusive sopen test */
...@@ -96,9 +97,8 @@ int main() ...@@ -96,9 +97,8 @@ int main()
else else
printf("!FAILURE lock() non-functional (or file already locked)\n"); printf("!FAILURE lock() non-functional (or file already locked)\n");
if(lock(fd,LOCK_OFFSET,LOCK_LEN)==0) if(lock(fd,LOCK_OFFSET,LOCK_LEN)==0)
printf("Subsequent lock succeeded\n"); printf("!FAILURE: Subsequent lock of region was allowed\n");
else
perror("!Subsequent lock of "LOCK_FNAME);
if(_beginthread( if(_beginthread(
lock_test_thread /* entry point */ lock_test_thread /* entry point */
,0 /* stack size (0=auto) */ ,0 /* stack size (0=auto) */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment