redirect stdin when using execl

Bjorn Engsig bengsig at oracle.nl
Fri Jun 9 04:00:55 AEST 1989


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.  I suppose you did
send a mail to Ron describing how to do it the right way (as I did, got it Ron?)
since you seem to be one of the wizards who knows when to follow up, and when
not to follow up.  BTW, I'm also a wizard (IMHO :-) and I didn't try to post
this followup to alt.flame as your Followup-To: line suggested.  (You don't
get me-ee!)

Maybe you should ask the administrator of the coming monthly posting to add
a few short examples of how to use fork and exec.  It will always be a bit of
a mystery to the beginner why there is not just a single spawn() call.
-- 
Bjorn Engsig, ORACLE Europe         \ /    "Hofstadter's Law:  It always takes
Path:   mcvax!orcenl!bengsig         X      longer than you expect, even if you
Domain: bengsig at oracle.nl           / \     take into account Hofstadter's Law"



More information about the Comp.unix.wizards mailing list