runit

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

lock_exnb.c (167B)


      1 /* Public domain. */
      2 
      3 #include <sys/types.h>
      4 #include <sys/file.h>
      5 #include <fcntl.h>
      6 #include "lock.h"
      7 
      8 int lock_exnb(int fd) { return flock(fd,LOCK_EX | LOCK_NB); }