redirect stdin when using execl
Ron Winnacott
ron at sc50.UUCP
Wed Jun 7 00:26:11 AEST 1989
Hello net.
Can anyone tell me how to redirect stdin when I use execl to
start a new program. The problem I am haveing is this, I am writing
a C program that forks then execl's a new program, But I need to
use a redirect "<" in the execl call.
execl("/bin/mail","mail","ron","<","/tmp/tfile",NULL);
The fork works fine, and mail starts and has a PPID of 1, but it
just sits there waiting for the letter and EOF to come from stdin.
If you can help me please email to !uunet!attcan!telly!sc50!ron
Thanks ron winacott.
--
Ron Winacott. Unisys Canada, Support center.
phone- (416) 495-4585
uucp - uunet!attcan!telly!sc50!ron
*** All comments/statements made are MINE and MINE alone. ***
More information about the Comp.lang.c
mailing list