/freebsd/sys/contrib/openzfs/cmd/zed/zed.d/ |
H A D | zed-functions.sh | 113 local lockfile="$1" 118 [ -n "${lockfile}" ] || return 119 if ! expr "${lockfile}" : '.*/' >/dev/null 2>&1; then 120 lockfile="${ZED_LOCKDIR}/${lockfile}" 128 eval "exec ${fd}>> '${lockfile}'" 130 zed_log_err "failed to lock \"${lockfile}\": ${err}" 155 local lockfile="$1" 159 [ -n "${lockfile}" ] || return 160 if ! expr "${lockfile}" : '.*/' >/dev/null 2>&1; then 161 lockfile="${ZED_LOCKDIR}/${lockfile}" [all …]
|
/freebsd/contrib/netbsd-tests/kernel/ |
H A D | t_lockf.c | 62 const char *lockfile = "lockf_test"; variable 77 fd = open (lockfile, O_RDWR, 0); in trylocks() 80 err(1, "%s", lockfile); in trylocks() 131 (void)unlink(lockfile); in ATF_TC_BODY() 133 fd = open (lockfile, O_RDWR|O_CREAT|O_EXCL|O_TRUNC, 0666); in ATF_TC_BODY() 134 ATF_REQUIRE_MSG(fd >= 0, "open(%s): %s", lockfile, strerror(errno)); in ATF_TC_BODY() 137 "ftruncate(%s): %s", lockfile, strerror(errno)); in ATF_TC_BODY() 226 (void)unlink(lockfile); in ATF_TC_BODY() 228 fd = open (lockfile, O_RDWR|O_CREAT|O_EXCL|O_TRUNC, 0666); in ATF_TC_BODY() 229 ATF_REQUIRE_MSG(fd >= 0, "open(%s): %s", lockfile, strerror(errno)); in ATF_TC_BODY() [all …]
|
/freebsd/contrib/sendmail/contrib/ |
H A D | movemail.pl | 50 use vars qw(@queues $subqbase @ages $remqueue $lockfile); 65 if ($lockfile) { 66 open LOCK, ">>$lockfile" 103 if ($lockfile) { 104 unlink $lockfile;
|
H A D | movemail.conf | 35 $lockfile = "/var/spool/mqueue/movemail.lock";
|
/freebsd/sys/contrib/openzfs/lib/libshare/ |
H A D | nfs.c | 255 nfs_toggle_share(const char *lockfile, const char *exports, in nfs_toggle_share() argument 265 error = nfs_exports_lock(lockfile, &nfs_lock_fd); in nfs_toggle_share() 280 nfs_exports_unlock(lockfile, &nfs_lock_fd); in nfs_toggle_share() 285 nfs_exports_unlock(lockfile, &nfs_lock_fd); in nfs_toggle_share() 290 nfs_reset_shares(const char *lockfile, const char *exports) in nfs_reset_shares() argument 294 if (nfs_exports_lock(lockfile, &nfs_lock_fd) == 0) { in nfs_reset_shares() 296 nfs_exports_unlock(lockfile, &nfs_lock_fd); in nfs_reset_shares()
|
H A D | nfs.h | 34 int nfs_toggle_share(const char *lockfile, const char *exports, 37 void nfs_reset_shares(const char *lockfile, const char *exports);
|
/freebsd/usr.sbin/nfsdumpstate/ |
H A D | nfsdumpstate.c | 70 char *lockfile; in main() local 75 lockfile = NULL; in main() 82 lockfile = optarg; in main() 90 if (openstate == 0 && lockfile == NULL) in main() 92 else if (openstate != 0 && lockfile != NULL) in main() 102 dump_lockstate(lockfile); in main()
|
/freebsd/usr.sbin/bsnmpd/modules/snmp_hostres/ |
H A D | hostres_printer_tbl.c | 145 char lockfile[MAXPATHLEN]; in get_printer_status() local 152 strlcpy(lockfile, pp->lock_file, sizeof(lockfile)); in get_printer_status() 154 snprintf(lockfile, sizeof(lockfile), "%s/%s", in get_printer_status() 157 fd = open(lockfile, O_RDONLY); in get_printer_status()
|
/freebsd/contrib/sendmail/libsmutil/ |
H A D | t-lockfile.c | 153 locked = lockfile(fd, filename, "[owner]", LOCK_EX); 172 locked = lockfile(fd, filename, "[owner]", LOCK_UN); 282 locked = lockfile(fd, filename, "[client]", lt|LOCK_NB); 292 locked = lockfile(fd, filename, "[client]", lt); 304 locked = lockfile(fd, filename, "[client]", LOCK_UN);
|
H A D | Makefile.m4 | 18 smcheck(`t-lockfile', `compile') 19 smcheck(`t-lockfile-0.sh', `run')
|
H A D | lockfile.c | 37 lockfile(fd, filename, ext, type)
|
H A D | t-lockfile-0.sh | 19 PRG=./t-lockfile
|
H A D | t-maplock-0.sh | 31 CHKL=./t-lockfile
|
/freebsd/contrib/unbound/contrib/ |
H A D | unbound.init_fedora | 31 lockfile=/var/lock/subsys/unbound 51 [ $retval -eq 0 ] && touch $lockfile 60 [ $retval -eq 0 ] && rm -f $lockfile
|
H A D | unbound.init_yocto | 32 lockfile=/var/lock/subsys/$prog 67 [ $retval -eq 0 ] && touch $lockfile 77 [ $retval -eq 0 ] && rm -f $lockfile
|
H A D | unbound.init | 32 lockfile=/var/lock/subsys/$prog 67 [ $retval -eq 0 ] && touch $lockfile 77 [ $retval -eq 0 ] && rm -f $lockfile
|
/freebsd/contrib/ntp/ntpd/ |
H A D | refclock_acts.c | 464 char lockfile[128], pidbuf[8]; in acts_timeout() local 488 snprintf(lockfile, sizeof(lockfile), LOCKFILE, in acts_timeout() 490 fd = open(lockfile, O_WRONLY | O_CREAT | O_EXCL, in acts_timeout() 595 char lockfile[128]; in acts_close() local 609 snprintf(lockfile, sizeof(lockfile), in acts_close() 611 unlink(lockfile); in acts_close()
|
/freebsd/usr.sbin/periodic/ |
H A D | periodic.sh | 54 lockfile=/var/run/periodic.${arg##*/}.lock 55 lockf -s -t 0 "${lockfile}" /bin/sh $0 LOCKED "$arg" 59 echo "can't create ${lockfile}" | \
|
/freebsd/usr.bin/at/ |
H A D | Makefile.inc | 1 LOCKFILE = .lockfile
|
/freebsd/crypto/openssh/ |
H A D | sshkey-xmss.c | 450 char *statefile = NULL, *ostatefile = NULL, *lockfile = NULL; in sshkey_xmss_get_state() local 472 if (asprintf(&lockfile, "%s.lock", filename) == -1 || in sshkey_xmss_get_state() 478 if ((lockfd = open(lockfile, O_CREAT|O_RDONLY, 0600)) == -1) { in sshkey_xmss_get_state() 480 PRINT("cannot open/create: %s", lockfile); in sshkey_xmss_get_state() 486 PRINT("cannot lock: %s", lockfile); in sshkey_xmss_get_state() 491 PRINT("giving up on: %s", lockfile); in sshkey_xmss_get_state() 528 free(lockfile); in sshkey_xmss_get_state()
|
/freebsd/lib/libsmutil/ |
H A D | Makefile | 23 SRCS+= debug.c err.c lockfile.c safefile.c snprintf.c cf.c
|
/freebsd/crypto/heimdal/ |
H A D | ltmain.sh | 2138 lockfile="$output_obj.lock" 2142 lockfile= 2148 until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do 2149 func_echo "Waiting for $lockfile to be removed" 2153 if test -f "$lockfile"; then 2155 *** ERROR, $lockfile exists and contains: 2156 `cat $lockfile 2>/dev/null` 2169 $ECHO "$srcfile" > "$lockfile" 2173 func_append removelist " $lockfile" 2204 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then [all …]
|
/freebsd/contrib/openbsm/config/ |
H A D | ltmain.sh | 3455 lockfile=$output_obj.lock 3459 lockfile= 3465 until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do 3466 func_echo "Waiting for $lockfile to be removed" 3470 if test -f "$lockfile"; then 3472 *** ERROR, $lockfile exists and contains: 3473 `cat $lockfile 2>/dev/null` 3486 $ECHO "$srcfile" > "$lockfile" 3490 func_append removelist " $lockfile" 3521 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then [all …]
|
/freebsd/contrib/openpam/ |
H A D | ltmain.sh | 3708 lockfile=$output_obj.lock 3712 lockfile= 3718 until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do 3719 func_echo "Waiting for $lockfile to be removed" 3723 if test -f "$lockfile"; then 3725 *** ERROR, $lockfile exists and contains: 3726 `cat $lockfile 2>/dev/null` 3739 $ECHO "$srcfile" > "$lockfile" 3743 func_append removelist " $lockfile" 3774 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then [all …]
|
/freebsd/contrib/ntp/sntp/libevent/ |
H A D | ltmain.sh | 3455 lockfile=$output_obj.lock 3459 lockfile= 3465 until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do 3466 func_echo "Waiting for $lockfile to be removed" 3470 if test -f "$lockfile"; then 3472 *** ERROR, $lockfile exists and contains: 3473 `cat $lockfile 2>/dev/null` 3486 $ECHO "$srcfile" > "$lockfile" 3490 func_append removelist " $lockfile" 3521 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then [all …]
|