Home
last modified time | relevance | path

Searched refs:tmpfd (Results 1 – 25 of 30) sorted by relevance

12

/illumos-gate/usr/src/cmd/nohup/
H A Dnohup.c250 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()
312 tmpfd = pr_open(g_proc, "/dev/tty", O_RDWR, 0); in fd_cb()
314 if (tmpfd != fd && tmpfd >= 0) { in fd_cb()
315 (void) pr_fcntl(g_proc, tmpfd, F_DUP2FD, (void *)(uintptr_t)fd); in fd_cb()
316 (void) pr_close(g_proc, tmpfd); in fd_cb()
/illumos-gate/usr/src/cmd/mail/
H A Dmain.c49 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 Ddapl_tavor_hca.c180 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 Dclient.c669 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 Dpolicy.c1041 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 Ddos2unix.c93 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 Dunix2dos.c94 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 Dmain.c102 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/xstr/
H A Dxstr.c55 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/cmd-inet/usr.bin/pppd/
H A Dsys-solaris.c553 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()
579 if (myioctl(tmpfd, I_PUSH, IP_MOD_NAME) < 0) { in plumb_ipif()
598 if (myioctl(tmpfd, IF_UNITSEL, &ifunit) < 0) { in plumb_ipif()
625 (void) close(tmpfd); in plumb_ipif()
630 (void) close(tmpfd); in plumb_ipif()
3074 int udp6fd = -1, tmpfd; in plumb_ip6if() local
3088 if (tmpfd < 0) { in plumb_ip6if()
3141 (void) close(tmpfd); in plumb_ip6if()
[all …]
/illumos-gate/usr/src/lib/libcmdutils/common/
H A Dprocess_xattrs.c85 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/cron/
H A Dcrontab.c141 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/cmd/auditreduce/
H A Dmain.c852 int tmpfd = -1; in open_outfile() local
858 if ((tmpfd = mkstemp(f_outtemp)) == -1) { in open_outfile()
865 if (tmpfd != fileno(stdout)) { in open_outfile()
866 if ((dup2(tmpfd, fileno(stdout))) == -1) { in open_outfile()
873 (void) close(tmpfd); in open_outfile()
/illumos-gate/usr/src/cmd/refer/
H A Dsortbib.c24 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 Dedquota.c112 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 Dvacation.c751 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 Dsubshell.c89 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 Dlibzfs_input_check.c742 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 Dfio.c496 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 Drsmlib.c120 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
1223 if (tmpfd < 0) { in rsm_memseg_import_connect()
[all …]
/illumos-gate/usr/src/cmd/ttymon/
H A Dttymon.c370 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 Dfiles_attr.c1144 int tmpfd; in files_update_history() local
1162 if ((tmpfd = open(HISTEMP, O_WRONLY|O_CREAT|O_TRUNC, HISTMODE)) < 0) { in files_update_history()
1165 (void) fchown(tmpfd, (uid_t)0, (gid_t)0); in files_update_history()
1173 if ((dst = fdopen(tmpfd, "wF")) == NULL) { in files_update_history()
/illumos-gate/usr/src/uts/common/syscall/
H A Dpoll.c1627 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 Ddevalloc.c1434 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 Dkdb5_ldap_services.c1077 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);

12