I am currently working on a similar issue but have solved it in part.<br>
<br>
The answer depends upon where ("c" or "C-script" you want to do the re-direct) since you say it's a silly question, I'm not sure which you want to do.<br>
<br>
I will give you the benefit of the doubt and assume you want to do it in a "c" compiled program.<br>
<br>
Disclaimer: I received what I'm going to show you as a fax from IBM. so for legal purposes I want to give them credit. If you want the entire program, along with the entire legal disclaimer, contact IBM for the full program...It is called 'motalk.c'<br>
<br>
at any rate, here is an excerpt that give the idea. Be aware that there is a bunch of 'setup' stuff required. The whole program is about 150 -200 lines of code. If you send me your E-mail address I can send you a copy of the entire program.<br>
<br>
<br>
while(1)<br>
{<br>
<br>
if(select(rfd, &afds, &afds, (fd_set *)0, (struct timeval *)0) < 0)<br>
printf("Select failed - errno = %d\n", errno);<br>
<br>
if(FD_ISSET(rfd, &afds))<br>
while ((num = read(rfd, buffer, 4096)) > 0)<br>
write(fileno(stdout), buffer, num);<br>
<br>
if(FD_ISSET(std, &afds))<br>
while ((num = read(fileno(stdin), buffer, 4096)) > 0)<br>
write(fileno(fdw), buffer, num);<br>
<br>
}<br>
<br>
Now, for a question of my own...... How do you convince X-modem to accept input from somewhere other that stdin/stdout? Or, stated differently, how do I spawn a process whose stdin/stdout is already /dev/tty?<br>
<br>
Also, if you could tell me how to 'post' inquiries myself, I would appreciate it.<br>
<br>
des

<br>