/illumos-gate/usr/src/lib/libzonecfg/common/ |
H A D | getzoneent.c | 201 int lock_fd; local 213 lock_fd = open(path, O_CREAT|O_RDWR, 0644); 214 if (lock_fd == -1) 222 if (fcntl(lock_fd, F_SETLKW, &lock) == -1) { 223 (void) close(lock_fd); 227 return (lock_fd); 231 unlock_index_file(int lock_fd) argument 240 if (fcntl(lock_fd, F_SETLK, &lock) == -1) 243 if (close(lock_fd) == -1) 273 int tmp_file_desc, lock_fd, er local [all...] |
/illumos-gate/usr/src/cmd/svr4pkg/libinst/ |
H A D | lockinst.c | 76 static int lock_fd, lock_is_applied; variable 194 lock_fd = fd; 256 (void) wrlockdata(lock_fd, lock_pid, lock_name, lock_pkg, place, 268 (void) wrlockdata(lock_fd, lock_pid, lock_name, lock_pkg, 276 if (close(lock_fd) != -1)
|
H A D | ocfile.c | 102 static int lock_fd; /* fd of LOCKFILE. */ variable 568 lock_fd = open(lockpath, O_RDWR|O_CREAT|O_TRUNC|O_EXCL, 0644); 569 if (lock_fd < 0) { 574 (void) fchmod(lock_fd, 0644); /* force perms. */ 577 if ((lock_fd = open(lockpath, O_RDWR)) == -1) { 588 if (lockf(lock_fd, F_LOCK, 0)) { 633 if (close(lock_fd))
|
/illumos-gate/usr/src/cmd/sendmail/libsmdb/ |
H A D | smdb.c | 307 ** lock_fd -- The resulting descriptor for the locked file. 318 smdb_lock_file(lock_fd, db_name, mode, sff, extension) 319 int *lock_fd; 333 *lock_fd = safeopen(file_name, mode & ~O_TRUNC, DBMMODE, sff); 334 if (*lock_fd < 0) 345 ** lock_fd -- The descriptor for the locked file. 352 smdb_unlock_file(lock_fd) 353 int lock_fd; 357 result = close(lock_fd);
|
H A D | smdb1.c | 461 int lock_fd; local 492 lock_fd = -1; 493 result = smdb_lock_file(&lock_fd, db_name, mode, sff, 510 (void) smdb_unlock_file(lock_fd); 515 db1->smdb1_lock_fd = lock_fd;
|
H A D | smndbm.c | 499 int lock_fd; local 527 lock_fd = -1; 528 result = smdb_lock_file(&lock_fd, db_name, mode, sff, 542 (void) close(lock_fd); 562 db->smndbm_lock_fd = lock_fd;
|
H A D | smdb2.c | 579 int lock_fd; local 605 lock_fd = -1; 611 result = smdb_lock_file(&lock_fd, db_name, mode, sff, 626 smdb_unlock_file(lock_fd); 631 db2->smdb2_lock_fd = lock_fd;
|
/illumos-gate/usr/src/cmd/lp/cmd/lpsched/ |
H A D | lpsched.c | 46 int lock_fd = -1; variable 211 if ((lock_fd = open_locked(Lp_Schedlock, "a", 0664)) < 0) 216 close(lock_fd); 223 if ((lock_fd = open_locked(Lp_Schedlock, "w", 0664)) < 0) 282 (void) close(lock_fd);
|
H A D | lpsched.h | 397 extern int lock_fd;
|
H A D | exec.c | 83 (void)Fcntl (lock_fd, F_SETLK, &l);
|
/illumos-gate/usr/src/lib/libdladm/common/ |
H A D | libdlflow.c | 83 int lock_fd; local 86 if ((lock_fd = open(DLADM_FLOW_DB_LOCK, O_RDWR | O_CREAT | O_TRUNC, 95 if (fcntl(lock_fd, F_SETLKW, &lock) < 0) { 96 (void) close(lock_fd); 100 return (lock_fd); 326 int nfd, fn_rc, lock_fd; local 346 if ((lock_fd = i_dladm_flow_lock_db(F_WRLCK)) < 0) 350 i_dladm_flow_unlock_db(lock_fd); 357 i_dladm_flow_unlock_db(lock_fd); 365 i_dladm_flow_unlock_db(lock_fd); 490 int lock_fd; local [all...] |
H A D | libdladm.c | 580 int lock_fd; local 583 if ((lock_fd = open(lock_file, O_RDWR | O_CREAT | O_TRUNC, 592 if (fcntl(lock_fd, F_SETLKW, &lock) < 0) { 595 (void) close(lock_fd); 600 return (lock_fd); 717 int nfd, lock_fd; local 730 if ((lock_fd = i_dladm_lock_db 738 i_dladm_unlock_db(lock, lock_fd); 751 i_dladm_unlock_db(lock, lock_fd); 759 i_dladm_unlock_db(lock, lock_fd); [all...] |
/illumos-gate/usr/src/cmd/allocate/ |
H A D | allocate3.c | 1000 char *zonename, int *lock_fd) 1098 if ((*lock_fd = lock_dev(fname, &stat_buf)) == -1) { 1150 int *lock_fd) 1241 zonename, lock_fd)) { 1256 if ((*lock_fd = lock_dev(fname, &stat_buf)) == -1) { 1357 int lock_fd = -1; local 1379 &lock_fd); 1404 error = _allocate_dev(optflag, uid, da, zonename, &lock_fd); 1417 if (lock_fd != -1) 1418 (void) close(lock_fd); 999 _deallocate_dev(int optflag, devalloc_t *da, devmap_t *dm_in, uid_t uid, char *zonename, int *lock_fd) argument 1149 _allocate_dev(int optflag, uid_t uid, devalloc_t *da, char *zonename, int *lock_fd) argument 1435 int lock_fd = -1; local [all...] |
/illumos-gate/usr/src/cmd/syseventd/modules/sysevent_conf_mod/ |
H A D | sysevent_conf_mod.h | 146 static void exit_lock(int lock_fd, char *lock_file);
|
H A D | sysevent_conf_mod.c | 809 int lock_fd; local 812 lock_fd = open(lock_file, O_CREAT|O_RDWR, 0644); 813 if (lock_fd < 0) { 825 if (fcntl(lock_fd, F_SETLKW, &lock) == -1) { 828 (void) close(lock_fd); 834 return (lock_fd); 839 exit_lock(int lock_fd, char *lock_file) argument 848 if (fcntl(lock_fd, F_SETLK, &lock) == -1) { 853 if (close(lock_fd) == -1) { 2154 int lock_fd; local [all...] |
/illumos-gate/usr/src/cmd/syseventadm/ |
H A D | syseventadm.c | 87 static int lock_fd; variable 229 lock_fd = open(lock_file, O_CREAT|O_RDWR, 0644); 230 if (lock_fd < 0) { 242 if (fcntl(lock_fd, F_SETLKW, &lock) == -1) { 245 (void) close(lock_fd); 263 if (fcntl(lock_fd, F_SETLK, &lock) == -1) { 268 if (close(lock_fd) == -1) {
|
/illumos-gate/usr/src/cmd/krb5/slave/ |
H A D | kpropd.c | 530 int lock_fd; local 658 lock_fd = open(temp_file_name, O_RDWR|O_CREAT, 0600); 660 retval = krb5_lock_file(doit_context, lock_fd, 683 retval = krb5_lock_file(doit_context, lock_fd, KRB5_LOCKMODE_SHARED); 691 retval = krb5_lock_file(doit_context, lock_fd, KRB5_LOCKMODE_UNLOCK); 697 (void)close(lock_fd);
|
/illumos-gate/usr/src/lib/libdevinfo/ |
H A D | devinfo_devlink.c | 410 proto.lock_fd = -1; 1092 assert(hdp->lock_fd == -1); 3084 assert(hdp->lock_fd < 0); 3143 hdp->lock_fd = fd; 3165 if (hdp->lock_fd < 0) { 3176 if (fcntl(hdp->lock_fd, F_SETLK, &unlock) == -1) { 3181 (void) close(hdp->lock_fd); 3183 hdp->lock_fd = -1;
|
H A D | devinfo_devlink.h | 147 int lock_fd; /* lock file for updates */ member in struct:di_devlink_handle
|