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

#undef _POSIX_C_SOURCE
#undef _XOPEN_SOURCE

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

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