s/qmail  3.3.23
Next generation secure email transport
fd_copy.c
Go to the documentation of this file.
1 #include <fcntl.h>
2 #include "fd.h"
3 
4 int fd_copy(int to, int from)
5 {
6  if (to == from) return 0;
7  if (fcntl(from,F_GETFL,0) == -1) return -1;
8  close(to);
9  if (fcntl(from,F_DUPFD,to) == -1) return -1;
10  return 0;
11 }
int fd_copy(int to, int from)
Definition: fd_copy.c:4
substdio to
Definition: qmail-qmqpc.c:55
substdio from
Definition: qmail-qmqpc.c:56