/sendmail/include/sm/ |
H A D | fdset.h | 16 ** Note: SM_FD_OK_SELECT(fd) requires that ValidSocket(fd) has been checked 20 # define SM_FD_SET(fd, pfdset) FD_SET(fd, pfdset) 21 # define SM_FD_ISSET(fd, pfdset) FD_ISSET(fd, pfdset) 23 # define SM_FD_OK_SELECT(fd) (FD_SETSIZE <= 0 || (fd) < FD_SETSIZE)
|
/sendmail/libsmutil/ |
H A D | lockfile.c | 23 ** fd -- the file descriptor of the file. 37 lockfile(fd, filename, ext, type) 38 int fd; 59 if (fcntl(fd, action, &lfd) >= 0) 76 if (flock(fd, type) >= 0)
|
H A D | safefile.c | 691 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/test/ |
H A D | t_pathconf.c | 37 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/libsm/ |
H A D | fflush.c | 49 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 D | local.h | 115 ** file descriptor (fd) if possible. The 'fd' is needed to possibly 124 ** Iff (yes "iff") the 'fd' is "-1" in value then the mode change 131 ** fd -- to become the file descriptor value from 'fp' 145 # define SM_CONVERT_TIME(fp, fd, val, time) { \ 146 if (((fd) = sm_io_getinfo(fp, SM_IO_WHAT_FD, NULL)) == -1) \ 148 /* can't get an fd, likely internal 'fake' fp */ \ 165 if ((fp)->f_timeoutstate == SM_TIME_NONBLOCK && (fd) != -1) \ 168 ret = fcntl((fd), F_GETFL, 0); \ 169 if (ret == -1 || fcntl((fd), F_SETF [all...] |
H A D | refill.c | 35 ** 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 D | smstdio.c | 289 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 D | fvwrite.c | 67 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 D | setvbuf.c | 57 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 D | stdio.c | 54 ** 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/libsmdb/ |
H A D | smdb.c | 69 ** 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 D | smdb1.c | 202 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 D | smndbm.c | 139 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...] |
H A D | smdb2.c | 258 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);
|
/sendmail/sendmail/ |
H A D | stats.c | 135 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 D | util.c | 1658 ** 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 D | map.c | 2004 int fd; variable 2086 fd = open(buf, omode, DBMMODE); 2087 if (fd < 0) 2095 if (filechanged(buf, fd, &st)) 2098 (void) close(fd); 2105 if (st.st_mode == ST_MODE_NOFILE && fstat(fd, &st) < 0) 2108 (void) close(fd); 2116 if (!lockfile(fd, buf, NULL, mode == O_RDONLY ? LOCK_SH : LOCK_EX)) 2192 map->map_lockfd = fd; 2194 (void) close(fd); variable 2306 int fd; local 6313 int fd; local [all...] |
/sendmail/libmilter/ |
H A D | example.c | 99 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 D | worker.c | 50 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...] |
H A D | comm.c | 229 ** fd -- socket descriptor 241 retry_writev(fd, iov, iovcnt, timeout) 242 socket_t fd; 270 FD_WR_INIT(fd, wrs); 271 i = FD_WR_READY(fd, wrs, timeout); 280 n = writev(fd, iov, iovcnt);
|
H A D | libmilter.h | 182 (rds).fd = (sd); \ 187 (wrs).fd = (sd); \
|
/sendmail/mail.local/ |
H A D | mail.local.c | 205 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...] |
/sendmail/mailstats/ |
H A D | mailstats.c | 53 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/include/libsmdb/ |
H A D | smdb.h | 84 ** fd -- A pointer to store the returned fd in. 91 typedef int (*db_fd_func) __P((SMDB_DATABASE *db, int* fd));
|