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

12

/illumos-gate/usr/src/cmd/mail/
H A Dmain.c51 int tmpfd = -1; local
148 if ((tmpfd = mkstemp(dbgfname)) == -1) {
153 if ((dbgfp = fdopen(tmpfd, "w")) == (FILE *)NULL) {
156 (void) close(tmpfd);
/illumos-gate/usr/src/cmd/nohup/
H A Dnohup.c252 int tmpfd; local
286 tmpfd = pr_open(g_proc, file, oflags, 0);
288 if (tmpfd < 0) {
296 if (tmpfd != fd) {
297 (void) pr_fcntl(g_proc, tmpfd, F_DUP2FD,
299 (void) pr_close(g_proc, tmpfd);
314 tmpfd = pr_open(g_proc, "/dev/tty", O_RDWR, 0);
316 if (tmpfd != fd && tmpfd >= 0) {
317 (void) pr_fcntl(g_proc, tmpfd, F_DUP2F
[all...]
/illumos-gate/usr/src/cmd/genmsg/
H A Dmain.c104 int tmpfd = -1; local
302 if ((tmpfd = mkstemp(tmpfile)) == -1) {
310 if ((newfp = fdopen(tmpfd, "w")) == NULL) {
316 (void) close(tmpfd);
/illumos-gate/usr/src/cmd/sunpc/other/
H A Ddos2unix.c95 static int tmpfd = -1; variable
197 tmpfd = mkstemp(out_file_name);
198 if (tmpfd == -1) {
202 (void) close(tmpfd);
H A Dunix2dos.c97 static int tmpfd = -1; variable
200 tmpfd = mkstemp(out_file_name);
201 if (tmpfd == -1) {
205 (void) close(tmpfd);
/illumos-gate/usr/src/lib/libkmf/libkmf/common/
H A Dclient.c671 int fd = -1, tmpfd = -1; local
695 tmpfd = mkstemp(tempfn);
697 if (tmpfd == -1) {
704 ret = download_file(uri, proxy, proxy_port, maxsecs, tmpfd);
705 (void) close(tmpfd);
745 int fd = -1, tmpfd = -1; local
770 tmpfd = mkstemp(tempfn);
772 if (tmpfd == -1) {
779 ret = download_file(uri, proxy, proxy_port, maxsecs, tmpfd);
780 (void) close(tmpfd);
[all...]
H A Dpolicy.c1041 int prefix_len, tmpfd; local
1085 tmpfd = mkstemp(tmpfilename);
1087 if (tmpfd == -1) {
1091 if ((tmpfile = fdopen(tmpfd, "w")) == NULL) {
1092 (void) close(tmpfd);
1110 if (fchmod(tmpfd, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH) == -1) {
1111 (void) close(tmpfd);
/illumos-gate/usr/src/lib/udapl/udapl_tavor/tavor/
H A Ddapl_tavor_hca.c179 int tmpfd; local
248 tmpfd = fcntl(fd, F_DUPFD, 256);
249 if (tmpfd < 0) {
254 fd = tmpfd;
476 int tmpfd; local
502 tmpfd = fcntl(fd, F_DUPFD, 256);
503 if (tmpfd < 0) {
509 fd = tmpfd;
/illumos-gate/usr/src/cmd/vi/misc/
H A Dxstr.c74 int tmpfd; variable
111 tmpfd = mkstemp(strings);
112 if (tmpfd == -1) {
117 (void) close(tmpfd);
/illumos-gate/usr/src/cmd/xstr/
H A Dxstr.c57 int tmpfd; variable
97 tmpfd = mkstemp(strings);
98 if (tmpfd == -1) {
103 (void) close(tmpfd);
/illumos-gate/usr/src/cmd/refer/
H A Dsortbib.c26 int tmpfd = -1; variable
76 if ((tmpfd = mkstemp(tempfile)) == -1)
79 (void) close(tmpfd);
/illumos-gate/usr/src/lib/libcmdutils/common/
H A Dprocess_xattrs.c84 int tmpfd = -1; local
112 if ((tmpfd = dup(indfd)) == -1) {
117 if ((dirp = fdopendir(tmpfd)) == NULL) {
/illumos-gate/usr/src/cmd/cron/
H A Dcrontab.c136 int tmpfd = -1; local
252 tmpfd = mkstemp(edtemp);
253 if (fchown(tmpfd, ruid, -1) == -1) {
254 (void) close(tmpfd);
257 (void) close(tmpfd);
/illumos-gate/usr/src/cmd/auditreduce/
H A Dmain.c842 int tmpfd = -1; local
848 if ((tmpfd = mkstemp(f_outtemp)) == -1) {
855 if (tmpfd != fileno(stdout)) {
856 if ((dup2(tmpfd, fileno(stdout))) == -1) {
863 (void) close(tmpfd);
/illumos-gate/usr/src/cmd/cmd-inet/usr.bin/pppd/
H A Dsys-solaris.c559 int udpfd = -1, tmpfd; local
572 tmpfd = open(drvnam, O_RDWR | O_NONBLOCK, 0);
573 if (tmpfd < 0) {
581 if (strioctl(tmpfd, PPPIO_DEBUG, &x, sizeof (x), 0) < 0) {
585 if (myioctl(tmpfd, I_PUSH, IP_MOD_NAME) < 0) {
604 if (myioctl(tmpfd, IF_UNITSEL, &ifunit) < 0) {
609 ipmuxid = myioctl(udpfd, I_PLINK, (void *)tmpfd);
615 ipmuxid = myioctl(ipfd, I_LINK, (void *)tmpfd);
631 (void) close(tmpfd);
636 (void) close(tmpfd);
3133 int udp6fd = -1, tmpfd; local
[all...]
/illumos-gate/usr/src/cmd/fs.d/ufs/edquota/
H A Dedquota.c113 int tmpfd = -1; local
135 tmpfd = mkstemp(tmpfil);
136 if (tmpfd == -1 || fchown(tmpfd, getuid(), getgid()) == -1) {
140 (void) close(tmpfd);
/illumos-gate/usr/src/cmd/ttymon/
H A Dttymon.c384 int fd, tmpfd; local
480 if ((tmpfd = open(pmptr->p_device, O_RDWR|O_NONBLOCK)) == -1) {
487 (void) close(tmpfd);
/illumos-gate/usr/src/cmd/mailx/
H A Dfio.c496 int tmpfd = -1; local
529 if ((tmpfd = mkstemp(tempname)) == -1) {
535 if ((obuf = fdopen(tmpfd, "w")) == NULL) {
540 (void) close(tmpfd);
/illumos-gate/usr/src/lib/libshell/common/sh/
H A Dsubshell.c80 short tmpfd; /* saved tmp file descriptor */ member in struct:subshell
111 if((sp->tmpfd = fd = fcntl(1,F_DUPFD,10)) >= 0)
553 sp->tmpfd = -1;
635 if(sp->tmpfd>=0)
638 if (fcntl(sp->tmpfd,F_DUPFD,1) != 1)
640 sh_close(sp->tmpfd);
/illumos-gate/usr/src/cmd/sendmail/aux/
H A Dvacation.c756 int i, pipefd[2], tmpfd; local
809 tmpfd = -1;
810 tmpfd = mkstemp(tmpf_name);
811 if (tmpfd == -1) {
815 tmpf = fdopen(tmpfd, "w");
/illumos-gate/usr/src/lib/librsm/common/
H A Drsmlib.c122 int e, tmpfd; local
164 tmpfd = fcntl(_rsm_fd, F_DUPFD, 3);
165 if (tmpfd < 0) {
170 _rsm_fd = tmpfd;
762 int tmpfd; local
841 tmpfd = fcntl(p->rsmseg_fd, F_DUPFD, 256);
843 if (tmpfd < 0) {
848 p->rsmseg_fd = tmpfd;
1171 int tmpfd; local
1223 tmpfd
[all...]
/illumos-gate/usr/src/lib/passwdutil/
H A Dfiles_attr.c1143 int tmpfd; local
1161 if ((tmpfd = open(HISTEMP, O_WRONLY|O_CREAT|O_TRUNC, HISTMODE)) < 0) {
1164 (void) fchown(tmpfd, (uid_t)0, (gid_t)0);
1172 if ((dst = fdopen(tmpfd, "wF")) == NULL) {
/illumos-gate/usr/src/uts/common/syscall/
H A Dpoll.c1591 int tmpfd; local
1629 tmpfd = cached[count].fd;
1630 if (pcache_delete_fd(ps, tmpfd, count, which,
1644 if (cached[i].fd == tmpfd) {
1646 tmpfd, (ssize_t)i,
1664 if ((tmpfd = current[count].fd) >= 0) {
1668 if ((fp = getf(tmpfd)) == NULL) {
1705 releasef(tmpfd);
1728 releasef(tmpfd);
/illumos-gate/usr/src/lib/libbsm/common/
H A Ddevalloc.c1434 int rc = 0, lockfd = 0, tmpfd = 0; local
1445 if ((tmpfd = open(tmpdefpath, O_RDWR|O_CREAT, DA_DBMODE)) == -1) {
1449 (void) fchown(tmpfd, DA_UID, DA_GID);
1450 if ((tmpfp = fdopen(tmpfd, "r+")) == NULL) {
1451 (void) close(tmpfd);
1463 (void) close(tmpfd);
/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);

Completed in 117 milliseconds

12