Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!cs.utexas.edu!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.lang.c Subject: Re: redirect stdin when using execl Keywords: execl redirect stdin < Message-ID: <2322@auspex.auspex.com> Date: 2 Aug 89 18:41:44 GMT References: <414@sc50.UUCP> <851@pcsbst.UUCP> <1520@frog.UUCP> Reply-To: guy@auspex.auspex.com (Guy Harris) Organization: Auspex Systems, Santa Clara Lines: 13 >Two provisos: System V users will want to use fcntl(, F_DUPFD, ) instead of >dup2() Although: 1) S5R3 has "dup2()" and 2) 4.[23]BSD has "fcntl(F_DUPFD)" so if you're willing to rule out older systems you can avoid polluting your code with "#ifdef"s.