/illumos-gate/usr/src/cmd/nohup/ |
H A D | nohup.c | 250 int tmpfd; in fd_cb() local 284 tmpfd = pr_open(g_proc, file, oflags, 0); in fd_cb() 286 if (tmpfd < 0) { in fd_cb() 294 if (tmpfd != fd) { in fd_cb() 295 (void) pr_fcntl(g_proc, tmpfd, F_DUP2FD, in fd_cb() 297 (void) pr_close(g_proc, tmpfd); in fd_cb() 313 tmpfd = pr_open(g_proc, "/dev/tty", O_RDWR, 0); in fd_cb() 315 if (tmpfd != fd && tmpfd >= 0) { in fd_cb() 316 (void) pr_fcntl(g_proc, tmpfd, F_DUP2FD, (void *)(uintptr_t)fd, in fd_cb() 318 (void) pr_close(g_proc, tmpfd); in fd_cb()
|
/illumos-gate/usr/src/cmd/mail/ |
H A D | main.c | 49 int tmpfd = -1; in main() local 146 if ((tmpfd = mkstemp(dbgfname)) == -1) { in main() 151 if ((dbgfp = fdopen(tmpfd, "w")) == (FILE *)NULL) { in main() 154 (void) close(tmpfd); in main()
|
/illumos-gate/usr/src/lib/udapl/udapl_tavor/tavor/ |
H A D | dapl_tavor_hca.c | 180 int tmpfd; in dapli_process_tavor_node() local 249 tmpfd = fcntl(fd, F_DUPFD, 256); in dapli_process_tavor_node() 250 if (tmpfd < 0) { in dapli_process_tavor_node() 255 fd = tmpfd; in dapli_process_tavor_node() 477 int tmpfd; in dapls_ib_open_hca() local 503 tmpfd = fcntl(fd, F_DUPFD, 256); in dapls_ib_open_hca() 504 if (tmpfd < 0) { in dapls_ib_open_hca() 510 fd = tmpfd; in dapls_ib_open_hca()
|
/illumos-gate/usr/src/lib/libkmf/libkmf/common/ |
H A D | client.c | 669 int fd = -1, tmpfd = -1; in kmf_download_crl() local 693 tmpfd = mkstemp(tempfn); in kmf_download_crl() 695 if (tmpfd == -1) { in kmf_download_crl() 702 ret = download_file(uri, proxy, proxy_port, maxsecs, tmpfd); in kmf_download_crl() 703 (void) close(tmpfd); in kmf_download_crl() 743 int fd = -1, tmpfd = -1; in kmf_download_cert() local 768 tmpfd = mkstemp(tempfn); in kmf_download_cert() 770 if (tmpfd == -1) { in kmf_download_cert() 777 ret = download_file(uri, proxy, proxy_port, maxsecs, tmpfd); in kmf_download_cert() 778 (void) close(tmpfd); in kmf_download_cert()
|
H A D | policy.c | 1041 int prefix_len, tmpfd; in update_policyfile() local 1085 tmpfd = mkstemp(tmpfilename); in update_policyfile() 1087 if (tmpfd == -1) { in update_policyfile() 1091 if ((tmpfile = fdopen(tmpfd, "w")) == NULL) { in update_policyfile() 1092 (void) close(tmpfd); in update_policyfile() 1110 if (fchmod(tmpfd, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH) == -1) { in update_policyfile() 1111 (void) close(tmpfd); in update_policyfile()
|
/illumos-gate/usr/src/cmd/sunpc/other/ |
H A D | dos2unix.c | 93 static int tmpfd = -1; variable 195 tmpfd = mkstemp(out_file_name); in main() 196 if (tmpfd == -1) { in main() 200 (void) close(tmpfd); in main()
|
H A D | unix2dos.c | 94 static int tmpfd = -1; variable 197 tmpfd = mkstemp(out_file_name); in main() 198 if (tmpfd == -1) { in main() 202 (void) close(tmpfd); in main()
|
/illumos-gate/usr/src/cmd/genmsg/ |
H A D | main.c | 102 int tmpfd = -1; in main() local 300 if ((tmpfd = mkstemp(tmpfile)) == -1) { in main() 308 if ((newfp = fdopen(tmpfd, "w")) == NULL) { in main() 314 (void) close(tmpfd); in main()
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.bin/pppd/ |
H A D | sys-solaris.c | 553 int udpfd = -1, tmpfd; in plumb_ipif() local 566 tmpfd = open(drvnam, O_RDWR | O_NONBLOCK, 0); in plumb_ipif() 567 if (tmpfd < 0) { in plumb_ipif() 575 if (strioctl(tmpfd, PPPIO_DEBUG, &x, sizeof (x), 0) < 0) { in plumb_ipif() 579 if (myioctl(tmpfd, I_PUSH, IP_MOD_NAME) < 0) { in plumb_ipif() 598 if (myioctl(tmpfd, IF_UNITSEL, &ifunit) < 0) { in plumb_ipif() 603 ipmuxid = myioctl(udpfd, I_PLINK, (void *)tmpfd); in plumb_ipif() 609 ipmuxid = myioctl(ipfd, I_LINK, (void *)tmpfd); in plumb_ipif() 625 (void) close(tmpfd); in plumb_ipif() 630 (void) close(tmpfd); in plumb_ipif() [all …]
|
/illumos-gate/usr/src/cmd/xstr/ |
H A D | xstr.c | 55 int tmpfd; variable 95 tmpfd = mkstemp(strings); in main() 96 if (tmpfd == -1) { in main() 101 (void) close(tmpfd); in main()
|
/illumos-gate/usr/src/cmd/cron/ |
H A D | crontab.c | 141 int tmpfd = -1; in main() local 271 tmpfd = mkstemp(edtemp); in main() 272 if (fchown(tmpfd, ruid, -1) == -1) { in main() 273 (void) close(tmpfd); in main() 276 (void) close(tmpfd); in main()
|
/illumos-gate/usr/src/lib/libcmdutils/common/ |
H A D | process_xattrs.c | 85 int tmpfd = -1; in mv_xattrs() local 113 if ((tmpfd = dup(indfd)) == -1) { in mv_xattrs() 118 if ((dirp = fdopendir(tmpfd)) == NULL) { in mv_xattrs()
|
/illumos-gate/usr/src/cmd/auditreduce/ |
H A D | main.c | 855 int tmpfd = -1; in open_outfile() local 861 if ((tmpfd = mkstemp(f_outtemp)) == -1) { in open_outfile() 868 if (tmpfd != fileno(stdout)) { in open_outfile() 869 if ((dup2(tmpfd, fileno(stdout))) == -1) { in open_outfile() 876 (void) close(tmpfd); in open_outfile()
|
/illumos-gate/usr/src/cmd/refer/ |
H A D | sortbib.c | 24 int tmpfd = -1; variable 74 if ((tmpfd = mkstemp(tempfile)) == -1) in main() 77 (void) close(tmpfd); in main()
|
/illumos-gate/usr/src/cmd/fs.d/ufs/edquota/ |
H A D | edquota.c | 112 int tmpfd = -1; in main() local 134 tmpfd = mkstemp(tmpfil); in main() 135 if (tmpfd == -1 || fchown(tmpfd, getuid(), getgid()) == -1) { in main() 139 (void) close(tmpfd); in main()
|
/illumos-gate/usr/src/cmd/sendmail/util/ |
H A D | vacation.c | 751 int i, pipefd[2], tmpfd; local 805 tmpfd = -1; 806 tmpfd = mkstemp(tmpf_name); 807 if (tmpfd == -1) { 811 tmpf = fdopen(tmpfd, "w");
|
/illumos-gate/usr/src/contrib/ast/src/cmd/ksh93/sh/ |
H A D | subshell.c | 89 short tmpfd; /* saved tmp file descriptor */ member 125 if((sp->tmpfd = fd = fcntl(1,F_DUPFD,10)) >= 0) in sh_subtmpfile() 608 sp->tmpfd = -1; in sh_subshell() 698 if(sp->tmpfd>=0) in sh_subshell() 701 if (fcntl(sp->tmpfd,F_DUPFD,1) != 1) in sh_subshell() 703 sh_close(sp->tmpfd); in sh_subshell()
|
/illumos-gate/usr/src/test/zfs-tests/cmd/libzfs_input_check/ |
H A D | libzfs_input_check.c | 742 int tmpfd, err; in zfs_ioc_input_tests() local 761 tmpfd = mkstemp(filepath); in zfs_ioc_input_tests() 762 if (tmpfd < 0) { in zfs_ioc_input_tests() 786 test_send_new(snapshot, tmpfd); in zfs_ioc_input_tests() 788 test_recv_new(backup, tmpfd); in zfs_ioc_input_tests() 832 (void) close(tmpfd); in zfs_ioc_input_tests()
|
/illumos-gate/usr/src/cmd/mailx/ |
H A D | fio.c | 496 int tmpfd = -1; in edstop() local 529 if ((tmpfd = mkstemp(tempname)) == -1) { in edstop() 535 if ((obuf = fdopen(tmpfd, "w")) == NULL) { in edstop() 540 (void) close(tmpfd); in edstop()
|
/illumos-gate/usr/src/lib/librsm/common/ |
H A D | rsmlib.c | 120 int e, tmpfd; in _rsm_librsm_init() local 162 tmpfd = fcntl(_rsm_fd, F_DUPFD, 3); in _rsm_librsm_init() 163 if (tmpfd < 0) { in _rsm_librsm_init() 168 _rsm_fd = tmpfd; in _rsm_librsm_init() 760 int tmpfd; in rsm_memseg_export_create() local 839 tmpfd = fcntl(p->rsmseg_fd, F_DUPFD, 256); in rsm_memseg_export_create() 841 if (tmpfd < 0) { in rsm_memseg_export_create() 846 p->rsmseg_fd = tmpfd; in rsm_memseg_export_create() 1169 int tmpfd; in rsm_memseg_import_connect() local 1221 tmpfd = fcntl(p->rsmseg_fd, F_DUPFD, 256); /* make fd > 255 */ in rsm_memseg_import_connect() [all …]
|
/illumos-gate/usr/src/cmd/ttymon/ |
H A D | ttymon.c | 370 int fd, tmpfd; in open_device() local 467 if ((tmpfd = open(pmptr->p_device, O_RDWR|O_NONBLOCK)) == -1) { in open_device() 474 (void) close(tmpfd); in open_device()
|
/illumos-gate/usr/src/lib/passwdutil/ |
H A D | files_attr.c | 1149 int tmpfd; in files_update_history() local 1167 if ((tmpfd = open(HISTEMP, O_WRONLY|O_CREAT|O_TRUNC, HISTMODE)) < 0) { in files_update_history() 1170 (void) fchown(tmpfd, (uid_t)0, (gid_t)0); in files_update_history() 1178 if ((dst = fdopen(tmpfd, "wF")) == NULL) { in files_update_history()
|
/illumos-gate/usr/src/uts/common/syscall/ |
H A D | poll.c | 1627 int tmpfd; in pcacheset_resolve() local 1665 tmpfd = cached[count].fd; in pcacheset_resolve() 1666 if (pcache_delete_fd(ps, tmpfd, count, which, in pcacheset_resolve() 1680 if (cached[i].fd == tmpfd) { in pcacheset_resolve() 1682 tmpfd, (ssize_t)i, in pcacheset_resolve() 1700 if ((tmpfd = current[count].fd) >= 0) { in pcacheset_resolve() 1704 if ((fp = getf(tmpfd)) == NULL) { in pcacheset_resolve() 1741 releasef(tmpfd); in pcacheset_resolve() 1764 releasef(tmpfd); in pcacheset_resolve()
|
/illumos-gate/usr/src/lib/libbsm/common/ |
H A D | devalloc.c | 1434 int rc = 0, lockfd = 0, tmpfd = 0; in da_update_defattrs() local 1445 if ((tmpfd = open(tmpdefpath, O_RDWR|O_CREAT, DA_DBMODE)) == -1) { in da_update_defattrs() 1449 (void) fchown(tmpfd, DA_UID, DA_GID); in da_update_defattrs() 1450 if ((tmpfp = fdopen(tmpfd, "r+")) == NULL) { in da_update_defattrs() 1451 (void) close(tmpfd); in da_update_defattrs() 1463 (void) close(tmpfd); in da_update_defattrs()
|
/illumos-gate/usr/src/cmd/krb5/ldap_util/ |
H A D | kdb5_ldap_services.c | 1077 int tmpfd = -1; local 1113 tmpfd = creat(tmp_file, S_IRUSR|S_IWUSR); 1115 if (tmpfd == -1) { 1128 if (write(tmpfd, line, len) != len) { 1130 close(tmpfd);
|