Searched defs:fd (Results 1 - 25 of 27) sorted by relevance

12

/sendmail/libsm/
H A Dfflush.c49 int fd; local
65 SM_CONVERT_TIME(fp, fd, timeout, &to);
95 int fd; local
114 if ((fd = sm_io_getinfo(fp, SM_IO_WHAT_FD, NULL)) == -1)
116 /* can't get an fd, likely internal 'fake' fp */
118 fd = -1;
140 if (IS_IO_ERROR(fd, t, *timeout))
147 SM_IO_WR_TIMEOUT(fp, fd, *timeout);
H A Dsetvbuf.c57 int fd; local
81 SM_CONVERT_TIME(fp, fd, timeout, &to);
101 ** a `tty flag' to suggest that we check isatty(fd), but we do not
H A Drefill.c35 ** This #define uses a select() to wait for the 'fd' to become readable.
44 ** Note: if a valid 'fd' doesn't exist yet, don't use this (e.g. the
49 ** fd -- raw file descriptor (from 'fp') to use for select()
58 #define SM_IO_RD_TIMEOUT(fp, fd, to, timeout, sel_ret) \
68 if (FD_SETSIZE > 0 && (fd) >= FD_SETSIZE) \
74 FD_SET((fd), &sm_io_to_mask); \
76 FD_SET((fd), &sm_io_x_mask); \
81 (sel_ret) = select((fd) + 1, &sm_io_to_mask, NULL, \
146 int fd; local
172 SM_CONVERT_TIME(fp, fd, timeou
[all...]
H A Dfvwrite.c67 int fd; local
80 SM_CONVERT_TIME(fp, fd, timeout, &to);
98 if (IS_IO_ERROR(fd, w, timeout))
102 SM_IO_WR_TIMEOUT(fp, fd, timeout);
184 if (IS_IO_ERROR(fd, w, timeout))
188 SM_IO_WR_TIMEOUT(fp, fd, timeout);
246 if (IS_IO_ERROR(fd, w, timeout))
250 SM_IO_WR_TIMEOUT(fp, fd, timeout);
H A Dsmstdio.c289 int fd; local
294 fd = fileno((FILE *) fp->f_cookie);
295 if (fd < 0)
297 if (fstat(fd, &st) == 0)
329 int fd; local
334 fd = fileno(stream);
335 SM_REQUIRE(fd >= 0);
360 fp->f_file = fd;
H A Dstdio.c54 ** Success: 0 or greater (fd of file from open(2)).
386 ** SM_STDFDOPEN -- open file by primitive 'fd' rather than pathname
410 int oflags, tmp, fdflags, fd = *((int *) info); local
439 if ((fdflags = fcntl(fd, F_GETFL, 0)) < 0)
447 fp->f_file = fd;
/sendmail/test/
H A Dt_pathconf.c37 int fd; local
49 fd = mkstemp(tbuf);
50 if (fd < 0)
62 i = fpathconf(fd, _PC_CHOWN_RESTRICTED);
68 if (fchown(fd, 1, 1) >= 0)
77 if (fchown(fd, 1, 1) >= 0)
/sendmail/sendmail/
H A Dstats.c135 int fd; local
155 fd = safeopen(sfile, O_RDWR, 0600, sff);
156 if (fd < 0)
165 if (read(fd, (char *) &stats, sizeof(stats)) == sizeof(stats) &&
191 (void) lseek(fd, (off_t) 0, 0);
192 (void) write(fd, (char *) &stats, sizeof(stats));
193 (void) close(fd);
H A Dtls.c146 int fd; local
157 if ((fd = safeopen(randfile, O_RDONLY, 0, sff)) >= 0)
159 if (fstat(fd, &st) < 0)
218 (void) close(fd);
H A Dusersmtp.c744 auto int fd; local
758 pid = prog_open(argv, &fd, CurEnv);
763 (void *) &fd, SM_IO_RDONLY, NULL);
3101 /* don't try to read from a non-existent fd */
H A Dutil.c1658 ** fd -- file descriptor to check.
1666 checkfdopen(fd, where)
1667 int fd;
1673 if (fstat(fd, &st) < 0 && errno == EBADF)
1675 syserr("checkfdopen(%d): %s not open as expected!", fd, where);
1699 register int fd; local
1712 for (fd = 0; fd < maxfd; fd++)
1716 if (fstat(fd,
1761 register int fd; local
2096 int fd; local
[all...]
H A Ddeliver.c2800 syserr("deliver: cannot create mailer output channel, fd=%d",
2815 syserr("deliver: cannot create mailer input channel, fd=%d",
5257 int fd; local
5259 fd = sm_io_getinfo(e->e_lockfp, SM_IO_WHAT_FD, NULL);
5260 /* SM_ASSERT(fd >= 0); */
5261 if (fd >= 0)
5262 (void) close(fd);
H A Dmain.c3290 int fd; local
3330 ** We also compare the fd numbers here since OutChannel
3359 fd = open(SM_PATH_DEVNULL, O_WRONLY, 0666);
3360 if (fd == -1)
3367 if (fd >= 0)
3369 (void) dup2(fd, STDOUT_FILENO);
3370 (void) dup2(fd, STDERR_FILENO);
3371 (void) close(fd);
3896 ** fd -- the file descriptor to be filled.
3909 fill_fd(fd, wher
[all...]
H A Dsrvrsmtp.c656 /* setup I/O fd correctly for the SMTP server */
1041 int fd; local
1059 fd = sm_io_getinfo(InChannel, SM_IO_WHAT_FD, NULL);
1061 SM_FD_SET(fd, &readfds);
1063 if (select(fd + 1, FDSET_CAST &readfds,
1065 FD_ISSET(fd, &readfds) &&
1888 message("454 4.3.3 TLS not available: error set fd");
4009 ** SETUP_SMTPD_IO -- setup I/O fd correctly for the SMTP server
4018 ** may change I/O fd.
H A Dconf.c2915 int fd; local
2917 fd = open("/dev/tty", O_RDWR, 0);
2918 if (fd >= 0)
2920 (void) ioctl(fd, TIOCNOTTY, (char *) 0);
2921 (void) close(fd);
2938 fsync(fd)
2939 int fd;
2942 return fcntl(fd, F_SETFL, O_SYNC);
3522 ** fd -- the file descriptor of the file.
3536 lockfile(fd, filenam
[all...]
H A Dreadcf.c1103 auto int fd; local
1113 pid = prog_open(argv, &fd, CurEnv);
1118 (void *) &fd, SM_IO_RDONLY, NULL);
/sendmail/libmilter/
H A Dexample.c99 int fd = -1; local
117 if ((fd = mkstemp(priv->mlfi_fname)) < 0 ||
118 (priv->mlfi_fp = fdopen(fd, "w+")) == NULL)
120 if (fd >= 0)
121 (void) close(fd);
H A Dworker.c50 int fd = WR_PIPE; \
51 if (write(fd, &evt, sizeof(evt)) != sizeof(evt)) \
225 ** fd -- file descriptor
233 nonblocking(int fd, const char *name) argument
238 r = fcntl(fd, F_GETFL, 0);
246 r = fcntl(fd, F_SETFL, r | O_NONBLOCK);
348 #define WAIT_FD(i) (pfd[i].fd)
439 pfd[nfd].fd = RD_PIPE;
489 pfd[nfd].fd = ctx->ctx_sd;
558 ("PIPE DONE READ i=[%d] fd
[all...]
/sendmail/libsmdb/
H A Dsmdb.c69 ** fd -- the file descriptor of the file.
80 smdb_lockfile(fd, type)
81 int fd;
103 while ((i = fcntl(fd, action, &lfd)) < 0 && errno == EINTR)
125 int omode = fcntl(fd, F_GETFL, NULL);
128 syslog(LOG_ERR, "cannot lockf(%s%s, fd=%d, type=%o, omode=%o, euid=%d)",
129 filename, ext, fd, type, omode, euid);
136 while ((i = flock(fd, type)) < 0 && errno == EINTR)
145 int omode = fcntl(fd, F_GETFL, NULL);
148 syslog(LOG_ERR, "cannot flock(%s%s, fd
379 int fd; local
402 int fd; local
[all...]
H A Dsmdb1.c202 smdb1_fd(database, fd)
204 int *fd;
208 *fd = db->fd(db);
209 if (*fd == -1)
281 int fd; local
285 fd = db->fd(db);
286 if (fd == -1)
289 result = fchown(fd, ui
[all...]
H A Dsmdb2.c258 smdb2_fd(database, fd)
260 int *fd;
264 return db2_error_to_smdb(db->fd(db, fd));
327 int fd; local
331 result = db->fd(db, &fd);
335 result = fchown(fd, uid, gid);
653 result = db->fd(db, &db_fd);
H A Dsmndbm.c139 smdbm_fd(database, fd)
141 int *fd;
145 *fd = dbm_dirfno(dbm);
146 if (*fd <= 0)
246 int fd; local
250 fd = dbm_dirfno(dbm);
251 if (fd <= 0)
254 result = fchown(fd, uid, gid);
258 fd = dbm_pagfno(dbm);
259 if (fd <
[all...]
/sendmail/libsmutil/
H A Dsafefile.c691 int fd; local
746 fd = dfopen(fn, omode, cmode, sff);
747 if (fd < 0)
748 return fd;
749 if (filechanged(fn, fd, &stb))
752 (void) close(fd);
759 ftruncate(fd, (off_t) 0) < 0)
766 (void) close(fd);
772 return fd;
794 int fd; local
934 int fd = -1; local
[all...]
/sendmail/mailstats/
H A Dmailstats.c53 int ch, fd; local
223 fd = open(sfile, O_RDONLY, 0600);
224 if ((fd < 0) || (i = read(fd, &stats, sizeof stats)) < 0)
235 if ((i = read(fd, &stats, sizeof stats)) < 0)
343 (void) close(fd);
346 fd = open(sfile, O_RDWR | O_TRUNC, 0600);
347 if (fd >= 0)
348 (void) close(fd);
/sendmail/mail.local/
H A Dmail.local.c205 int ch, fd; local
215 for (fd = 10; fd < 30; fd++)
216 (void) close(fd);
410 fd = store(from, NULL);
412 if (fd < 0)
418 deliver(fd, *argv);
775 int fd; local
783 if ((fd
1490 int fd; local
1865 int fd; local
[all...]

Completed in 95 milliseconds

12