Xref: utzoo comp.lang.c:19376 comp.unix.wizards:16940 Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!novavax!infocenter!mhoffman From: mhoffman@infocenter.UUCP (Mike Hoffman) Newsgroups: comp.lang.c,comp.unix.wizards Subject: Re: redirect stdin when using execl Message-ID: <2753@infocenter.UUCP> Date: 15 Jun 89 13:22:21 GMT References: <851@pcsbst.UUCP> Organization: Gould CSD, Fort Lauderdale, FL Lines: 25 in article <352.nlhp3@oracle.nl>, bengsig@oracle.nl (Bjorn Engsig) says: | In article <3709@tank.uchicago.edu> matt@oddjob.uchicago.edu (Matt Crawford) writes: |>In article <414@sc50.UUCP>, ron@sc50 ( Ron Winnacott ) writes: |>) Can anyone tell me how to redirect stdin when I use execl ... |>) execl("/bin/mail","mail","ron","<","/tmp/tfile",NULL); |> |>So help me, if I see even ONE answer to this question posted in |>comp.unix.WIZARDS, I'll scream! | Hey come on, there is no need to flame this in this way. | Maybe you should ask the administrator of the coming monthly posting to add | a few short examples of how to use fork and exec. Then, in article <851@pcsbst.UUCP>, torsten@pcsbst.UUCP (torsten) says: | I think this should do it: | execl("/bin/sh","sh","/bin/mail ron < /tmp/tfile",NULL); I think Bjorn may be right. . .let's hope we don't see any more of this :-) ____ Michael J. Hoffman Manufacturing Engineering Encore Computer Corporation UUCP: {uunet,codas!novavax,sun,pur-ee}!gould!mhoffman "My opinions are my own and are not to be employed with those of my confuser."