Home
last modified time | relevance | path

Searched refs:lockfile (Results 1 – 25 of 42) sorted by relevance

12

/netbsd/src/lib/libutil/
Dpidlock.c49 pidlock(const char *lockfile, int flags, pid_t *locker, const char *info) in pidlock() argument
61 _DIAGASSERT(lockfile != NULL); in pidlock()
81 if (snprintf(tempfile, sizeof(tempfile), "%s.%d.%s", lockfile, in pidlock()
118 while (link(tempfile, lockfile) == -1) { in pidlock()
122 if ((f = open(lockfile, O_RDONLY, 0)) != -1) { in pidlock()
144 (void)unlink(lockfile); in pidlock()
214 char lockfile[MAXPATHLEN]; in ttylock() local
222 return pidlock(makelock(lockfile, sizeof(lockfile), tty), in ttylock()
229 char lockfile[MAXPATHLEN]; in ttyunlock() local
237 return unlink(makelock(lockfile, sizeof(lockfile), tty)); in ttyunlock()
/netbsd/src/tests/kernel/
Dt_lockf.c62 const char *lockfile = "lockf_test"; variable
77 fd = open (lockfile, O_RDWR, 0); in trylocks()
80 err(1, "%s", lockfile); in trylocks()
128 (void)unlink(lockfile); in ATF_TC_BODY()
130 fd = open (lockfile, O_RDWR|O_CREAT|O_EXCL|O_TRUNC, 0666); in ATF_TC_BODY()
131 ATF_REQUIRE_MSG(fd >= 0, "open(%s): %s", lockfile, strerror(errno)); in ATF_TC_BODY()
134 "ftruncate(%s): %s", lockfile, strerror(errno)); in ATF_TC_BODY()
223 (void)unlink(lockfile); in ATF_TC_BODY()
225 fd = open (lockfile, O_RDWR|O_CREAT|O_EXCL|O_TRUNC, 0666); in ATF_TC_BODY()
226 ATF_REQUIRE_MSG(fd >= 0, "open(%s): %s", lockfile, strerror(errno)); in ATF_TC_BODY()
[all …]
/netbsd/src/external/bsd/tmux/dist/
Dclient.c78 client_get_lock(char *lockfile) in client_get_lock() argument
82 log_debug("lock file is %s", lockfile); in client_get_lock()
84 if ((lockfd = open(lockfile, O_WRONLY|O_CREAT, 0600)) == -1) { in client_get_lock()
110 char *lockfile = NULL; in client_connect() local
137 xasprintf(&lockfile, "%s.lock", path); in client_connect()
138 if ((lockfd = client_get_lock(lockfile)) < 0) { in client_connect()
141 free(lockfile); in client_connect()
142 lockfile = NULL; in client_connect()
160 free(lockfile); in client_connect()
164 fd = server_start(client_proc, flags, base, lockfd, lockfile); in client_connect()
[all …]
Dserver.c175 int lockfd, char *lockfile) in server_start() argument
230 unlink(lockfile); in server_start()
231 free(lockfile); in server_start()
/netbsd/src/external/gpl2/lvm2/dist/lib/locking/
Dfile_locking.c258 char lockfile[PATH_MAX]; in _file_lock_resource() local
271 dm_snprintf(lockfile, sizeof(lockfile), in _file_lock_resource()
274 dm_snprintf(lockfile, sizeof(lockfile), in _file_lock_resource()
277 if (!_lock_file(lockfile, flags)) in _file_lock_resource()
/netbsd/src/libexec/mail.local/
Dmail.local.c77 int ch, fd, eval, lockfile = 0; in main() local
98 lockfile++; in main()
124 rval = deliver(fd, *argv, lockfile); in main()
195 deliver(int fd, char *name, int lockfile) in deliver() argument
219 if (lockfile) { in deliver()
303 if (lockfile) { in deliver()
/netbsd/src/external/bsd/ntp/dist/ntpd/
Drefclock_acts.c466 char lockfile[128], pidbuf[8]; in acts_timeout() local
490 snprintf(lockfile, sizeof(lockfile), LOCKFILE, in acts_timeout()
492 fd = open(lockfile, O_WRONLY | O_CREAT | O_EXCL, in acts_timeout()
597 char lockfile[128]; in acts_close() local
611 snprintf(lockfile, sizeof(lockfile), in acts_close()
613 unlink(lockfile); in acts_close()
/netbsd/src/external/gpl3/gdb/dist/gdb/testsuite/lib/
Dgdb-utils.exp145 proc lock_file_acquire {lockfile} { argument
148 if {![catch {open $lockfile {WRONLY CREAT EXCL}} rc]} {
155 return [list $rc $lockfile]
/netbsd/src/external/gpl2/lvm2/dist/daemons/cmirrord/
Dclogd.c90 static int create_lockfile(char *lockfile) in create_lockfile() argument
96 if((fd = open(lockfile, O_CREAT | O_WRONLY, in create_lockfile()
119 unlink(lockfile); in create_lockfile()
/netbsd/src/external/bsd/am-utils/dist/conf/mtab/
Dmtab_svr4.c82 lockfile(int fd, int type) in lockfile() function
119 if (lockfile(mntent_lock_fd, F_WRLCK) < 0) { in lockmnttab()
Dmtab_isc3.c65 lockfile(int fd, int type) in lockfile() function
84 if (lockfile(mtlckf, F_WRLCK) < 0) { in lockmnttab()
/netbsd/src/crypto/external/bsd/openssh/dist/
Dsshkey-xmss.c447 char *statefile = NULL, *ostatefile = NULL, *lockfile = NULL; in sshkey_xmss_get_state() local
469 if (asprintf(&lockfile, "%s.lock", filename) == -1 || in sshkey_xmss_get_state()
475 if ((lockfd = open(lockfile, O_CREAT|O_RDONLY, 0600)) == -1) { in sshkey_xmss_get_state()
477 PRINT("cannot open/create: %s", lockfile); in sshkey_xmss_get_state()
483 PRINT("cannot lock: %s", lockfile); in sshkey_xmss_get_state()
488 PRINT("giving up on: %s", lockfile); in sshkey_xmss_get_state()
525 free(lockfile); in sshkey_xmss_get_state()
/netbsd/src/external/gpl3/gcc/dist/
Dltmain.sh1469 lockfile="$output_obj.lock"
1473 lockfile=
1479 until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
1480 func_echo "Waiting for $lockfile to be removed"
1484 if test -f "$lockfile"; then
1486 *** ERROR, $lockfile exists and contains:
1487 `cat $lockfile 2>/dev/null`
1500 $ECHO "$srcfile" > "$lockfile"
1504 removelist="$removelist $lockfile"
1536 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
[all …]
/netbsd/src/external/gpl3/gdb/dist/
Dltmain.sh1469 lockfile="$output_obj.lock"
1473 lockfile=
1479 until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
1480 func_echo "Waiting for $lockfile to be removed"
1484 if test -f "$lockfile"; then
1486 *** ERROR, $lockfile exists and contains:
1487 `cat $lockfile 2>/dev/null`
1500 $ECHO "$srcfile" > "$lockfile"
1504 removelist="$removelist $lockfile"
1536 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
[all …]
/netbsd/src/external/gpl3/binutils/dist/
Dltmain.sh1469 lockfile="$output_obj.lock"
1473 lockfile=
1479 until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
1480 func_echo "Waiting for $lockfile to be removed"
1484 if test -f "$lockfile"; then
1486 *** ERROR, $lockfile exists and contains:
1487 `cat $lockfile 2>/dev/null`
1500 $ECHO "$srcfile" > "$lockfile"
1504 removelist="$removelist $lockfile"
1536 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
[all …]
/netbsd/src/external/bsd/am-utils/dist/
Dltmain.sh2139 lockfile="$output_obj.lock"
2143 lockfile=
2149 until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
2150 func_echo "Waiting for $lockfile to be removed"
2154 if test -f "$lockfile"; then
2156 *** ERROR, $lockfile exists and contains:
2157 `cat $lockfile 2>/dev/null`
2170 $ECHO "$srcfile" > "$lockfile"
2174 func_append removelist " $lockfile"
2205 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
[all …]
/netbsd/src/external/bsd/libbind/dist/
Dltmain.sh908 lockfile="$output_obj.lock"
909 removelist="$removelist $output_obj $lockfile"
914 lockfile=
920 until $run ln "$progpath" "$lockfile" 2>/dev/null; do
921 $show "Waiting for $lockfile to be removed"
925 if test -f "$lockfile"; then
927 *** ERROR, $lockfile exists and contains:
928 `cat $lockfile 2>/dev/null`
940 $echo "$srcfile" > "$lockfile"
1002 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
[all …]
/netbsd/src/external/bsd/iscsi/dist/buildaux/
Dltmain.sh925 lockfile="$output_obj.lock"
926 removelist="$removelist $output_obj $lockfile"
931 lockfile=
937 until $run ln "$progpath" "$lockfile" 2>/dev/null; do
938 $show "Waiting for $lockfile to be removed"
942 if test -f "$lockfile"; then
944 *** ERROR, $lockfile exists and contains:
945 `cat $lockfile 2>/dev/null`
957 $echo "$srcfile" > "$lockfile"
1019 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
[all …]
/netbsd/src/crypto/external/bsd/netpgp/dist/buildaux/
Dltmain.sh925 lockfile="$output_obj.lock"
926 removelist="$removelist $output_obj $lockfile"
931 lockfile=
937 until $run ln "$progpath" "$lockfile" 2>/dev/null; do
938 $show "Waiting for $lockfile to be removed"
942 if test -f "$lockfile"; then
944 *** ERROR, $lockfile exists and contains:
945 `cat $lockfile 2>/dev/null`
957 $ECHO "$srcfile" > "$lockfile"
1019 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
[all …]
/netbsd/src/external/lgpl3/mpc/dist/
Dltmain.sh3455 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 …]
/netbsd/src/external/bsd/file/dist/
Dltmain.sh3458 lockfile=$output_obj.lock
3462 lockfile=
3468 until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
3469 func_echo "Waiting for $lockfile to be removed"
3473 if test -f "$lockfile"; then
3475 *** ERROR, $lockfile exists and contains:
3476 `cat $lockfile 2>/dev/null`
3489 $ECHO "$srcfile" > "$lockfile"
3493 func_append removelist " $lockfile"
3524 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
[all …]
/netbsd/src/external/mit/expat/dist/conftools/
Dltmain.sh3829 lockfile=$output_obj.lock
3833 lockfile=
3839 until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
3840 func_echo "Waiting for $lockfile to be removed"
3844 if test -f "$lockfile"; then
3846 *** ERROR, $lockfile exists and contains:
3847 `cat $lockfile 2>/dev/null`
3860 $ECHO "$srcfile" > "$lockfile"
3864 func_append removelist " $lockfile"
3895 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
[all …]
/netbsd/src/external/lgpl3/gmp/dist/
Dltmain.sh3455 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 …]
/netbsd/src/external/bsd/openpam/dist/
Dltmain.sh3708 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 …]
/netbsd/src/external/lgpl3/mpfr/dist/
Dltmain.sh3700 lockfile=$output_obj.lock
3704 lockfile=
3710 until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
3711 func_echo "Waiting for $lockfile to be removed"
3715 if test -f "$lockfile"; then
3717 *** ERROR, $lockfile exists and contains:
3718 `cat $lockfile 2>/dev/null`
3731 $ECHO "$srcfile" > "$lockfile"
3735 func_append removelist " $lockfile"
3766 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
[all …]

12