want workaround for "dup2"
Mariusz at fbits.ttank.com
Mon Mar 18 17:52:22 AEST 1991
In article <1270 at hico2.UUCP>, kak at hico2.UUCP (Kris A. Kugel) writes:
> Hummm... I don't seem to have "dup2" either.
> Is there an easy way to provide dup2?
The following version was included with GNU `make'
dup2 (old, new)
int old, new;
(void) close (new);
newfd = fcntl (old, F_DUPFD, new);
if (newfd == -1)
if (newfd != new)
(void) close (newfd);
errno = EMFILE;
INET: Mariusz at fbits.ttank.com
CIS : 71601.2430 at compuserve.com
More information about the Comp.sys.3b1