| /src/lib/libutil/ |
| pidlock.c | 46 * Create a lockfile. Return 0 when locked, -1 on error. 49 pidlock(const char *lockfile, int flags, pid_t *locker, const char *info) 61 _DIAGASSERT(lockfile != NULL); 81 if (snprintf(tempfile, sizeof(tempfile), "%s.%d.%s", lockfile, 118 while (link(tempfile, lockfile) == -1) { 121 /* Find out who has this lockfile. */ 122 if ((f = open(lockfile, O_RDONLY, 0)) != -1) { 144 (void)unlink(lockfile); 214 char lockfile[MAXPATHLEN]; local 222 return pidlock(makelock(lockfile, sizeof(lockfile), tty) 229 char lockfile[MAXPATHLEN]; local [all...] |
| pidlock.c | 46 * Create a lockfile. Return 0 when locked, -1 on error. 49 pidlock(const char *lockfile, int flags, pid_t *locker, const char *info) 61 _DIAGASSERT(lockfile != NULL); 81 if (snprintf(tempfile, sizeof(tempfile), "%s.%d.%s", lockfile, 118 while (link(tempfile, lockfile) == -1) { 121 /* Find out who has this lockfile. */ 122 if ((f = open(lockfile, O_RDONLY, 0)) != -1) { 144 (void)unlink(lockfile); 214 char lockfile[MAXPATHLEN]; local 222 return pidlock(makelock(lockfile, sizeof(lockfile), tty) 229 char lockfile[MAXPATHLEN]; local [all...] |
| /src/tests/kernel/ |
| t_lockf.c | 62 const char *lockfile = "lockf_test"; variable 77 fd = open (lockfile, O_RDWR, 0); 80 err(1, "%s", lockfile); 128 (void)unlink(lockfile); 130 fd = open (lockfile, O_RDWR|O_CREAT|O_EXCL|O_TRUNC, 0666); 131 ATF_REQUIRE_MSG(fd >= 0, "open(%s): %s", lockfile, strerror(errno)); 134 "ftruncate(%s): %s", lockfile, strerror(errno)); local 223 (void)unlink(lockfile); 225 fd = open (lockfile, O_RDWR|O_CREAT|O_EXCL|O_TRUNC, 0666); 226 ATF_REQUIRE_MSG(fd >= 0, "open(%s): %s", lockfile, strerror(errno)) 229 "ftruncate(%s): %s", lockfile, strerror(errno)); local [all...] |
| t_lockf.c | 62 const char *lockfile = "lockf_test"; variable 77 fd = open (lockfile, O_RDWR, 0); 80 err(1, "%s", lockfile); 128 (void)unlink(lockfile); 130 fd = open (lockfile, O_RDWR|O_CREAT|O_EXCL|O_TRUNC, 0666); 131 ATF_REQUIRE_MSG(fd >= 0, "open(%s): %s", lockfile, strerror(errno)); 134 "ftruncate(%s): %s", lockfile, strerror(errno)); local 223 (void)unlink(lockfile); 225 fd = open (lockfile, O_RDWR|O_CREAT|O_EXCL|O_TRUNC, 0666); 226 ATF_REQUIRE_MSG(fd >= 0, "open(%s): %s", lockfile, strerror(errno)) 229 "ftruncate(%s): %s", lockfile, strerror(errno)); local [all...] |
| /src/external/bsd/am-utils/dist/conf/mtab/ |
| mtab_isc3.c | 65 lockfile(int fd, int type) function 84 if (lockfile(mtlckf, F_WRLCK) < 0) {
|
| mtab_svr4.c | 82 lockfile(int fd, int type) function 119 if (lockfile(mntent_lock_fd, F_WRLCK) < 0) {
|
| mtab_isc3.c | 65 lockfile(int fd, int type) function 84 if (lockfile(mtlckf, F_WRLCK) < 0) {
|
| mtab_svr4.c | 82 lockfile(int fd, int type) function 119 if (lockfile(mntent_lock_fd, F_WRLCK) < 0) {
|
| /src/external/gpl2/lvm2/dist/lib/locking/ |
| file_locking.c | 258 char lockfile[PATH_MAX]; local 271 dm_snprintf(lockfile, sizeof(lockfile), 274 dm_snprintf(lockfile, sizeof(lockfile), 277 if (!_lock_file(lockfile, flags)) 332 /* Get lockfile directory from config file */ 345 /* Change lockfile directory owner to match with others */
|
| file_locking.c | 258 char lockfile[PATH_MAX]; local 271 dm_snprintf(lockfile, sizeof(lockfile), 274 dm_snprintf(lockfile, sizeof(lockfile), 277 if (!_lock_file(lockfile, flags)) 332 /* Get lockfile directory from config file */ 345 /* Change lockfile directory owner to match with others */
|
| /src/libexec/mail.local/ |
| mail.local.c | 77 int ch, fd, eval, lockfile = 0; local 98 lockfile++; 124 rval = deliver(fd, *argv, lockfile); 195 deliver(int fd, char *name, int lockfile) 219 if (lockfile) { 303 if (lockfile) {
|
| mail.local.c | 77 int ch, fd, eval, lockfile = 0; local 98 lockfile++; 124 rval = deliver(fd, *argv, lockfile); 195 deliver(int fd, char *name, int lockfile) 219 if (lockfile) { 303 if (lockfile) {
|
| /src/external/bsd/ntp/dist/ntpd/ |
| refclock_acts.c | 136 #define LOCKFILE "/var/spool/lock/LCK..cua%d" 466 char lockfile[128], pidbuf[8]; local 490 snprintf(lockfile, sizeof(lockfile), LOCKFILE, 492 fd = open(lockfile, O_WRONLY | O_CREAT | O_EXCL, 597 char lockfile[128]; local 611 snprintf(lockfile, sizeof(lockfile), 612 LOCKFILE, up->unit) [all...] |
| refclock_acts.c | 136 #define LOCKFILE "/var/spool/lock/LCK..cua%d" 466 char lockfile[128], pidbuf[8]; local 490 snprintf(lockfile, sizeof(lockfile), LOCKFILE, 492 fd = open(lockfile, O_WRONLY | O_CREAT | O_EXCL, 597 char lockfile[128]; local 611 snprintf(lockfile, sizeof(lockfile), 612 LOCKFILE, up->unit) [all...] |
| /src/external/bsd/tmux/dist/ |
| client.c | 78 client_get_lock(char *lockfile) 82 log_debug("lock file is %s", lockfile); 84 if ((lockfd = open(lockfile, O_WRONLY|O_CREAT, 0600)) == -1) { 110 char *lockfile = NULL; local 137 xasprintf(&lockfile, "%s.lock", path); 138 if ((lockfd = client_get_lock(lockfile)) < 0) { 141 free(lockfile); 142 lockfile = NULL; 160 free(lockfile); 164 fd = server_start(client_proc, flags, base, lockfd, lockfile); [all...] |
| client.c | 78 client_get_lock(char *lockfile) 82 log_debug("lock file is %s", lockfile); 84 if ((lockfd = open(lockfile, O_WRONLY|O_CREAT, 0600)) == -1) { 110 char *lockfile = NULL; local 137 xasprintf(&lockfile, "%s.lock", path); 138 if ((lockfd = client_get_lock(lockfile)) < 0) { 141 free(lockfile); 142 lockfile = NULL; 160 free(lockfile); 164 fd = server_start(client_proc, flags, base, lockfd, lockfile); [all...] |
| /src/external/gpl2/xcvs/dist/src/ |
| rcs.c | 8529 /* Abort if we could not write everything successfully to LOCKFILE. 8584 char *lockfile, *lockp; local 8588 /* Create the lockfile name. */ 8590 lockfile = xmalloc (rcslen + 10); 8593 for (lockp = lockfile, rcsp = rcsfile; rcsp < rcsbase; ++rcsp) 8601 return lockfile;
|
| rcs.c | 8529 /* Abort if we could not write everything successfully to LOCKFILE. 8584 char *lockfile, *lockp; local 8588 /* Create the lockfile name. */ 8590 lockfile = xmalloc (rcslen + 10); 8593 for (lockp = lockfile, rcsp = rcsfile; rcsp < rcsbase; ++rcsp) 8601 return lockfile;
|