summaryrefslogtreecommitdiff
path: root/src/sysdeps/tryflock.c
blob: 0a65bdc2e5658e2374bdce280570c63a09ba2149 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* ISC license. */

#undef _POSIX_C_SOURCE
#undef _XOPEN_SOURCE

#include <sys/file.h>
#include <fcntl.h>

int main (void)
{
  return flock(0, LOCK_EX | LOCK_UN | LOCK_NB) ;
}