diff options
Diffstat (limited to 'tryflock.c')
| -rw-r--r-- | tryflock.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tryflock.c b/tryflock.c new file mode 100644 index 0000000..8c8aa76 --- /dev/null +++ b/tryflock.c | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | #include <sys/types.h> | ||
| 2 | #include <sys/file.h> | ||
| 3 | #include <fcntl.h> | ||
| 4 | |||
| 5 | void main() | ||
| 6 | { | ||
| 7 | flock(0,LOCK_EX | LOCK_UN | LOCK_NB); | ||
| 8 | } | ||
