redirect stdin when using execl

Mike Hoffman mhoffman at infocenter.UUCP
Thu Jun 15 23:22:21 AEST 1989


in article <352.nlhp3 at oracle.nl>, bengsig at oracle.nl (Bjorn Engsig) says:
| In article <3709 at tank.uchicago.edu> matt at oddjob.uchicago.edu (Matt Crawford) writes:
|>In article <414 at sc50.UUCP>, ron at 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 at pcsbst.UUCP>, torsten at 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."



More information about the Comp.lang.c mailing list