Xref: utzoo comp.lang.c:19205 comp.unix.wizards:16697 Path: utzoo!attcan!telly!sc50!ron From: ron@sc50.UUCP ( Ron Winnacott ) Newsgroups: comp.lang.c,comp.unix.wizards Subject: redirect stdin when using execl Keywords: execl redirect stdin < Message-ID: <414@sc50.UUCP> Date: 6 Jun 89 14:26:11 GMT Organization: UNISYS Support Center,North York Canada Lines: 20 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. ***