[LCP]interactive Telnet session

Chong Chee Yong catz at silvermoon.com.sg
Tue Sep 3 18:12:45 UTC 2002


Perhaps, dup2 doesn't work the way you think it is?

On Mon, 2 Sep 2002, Charles Randle wrote:

> What about output from STDERR (fd = 2) ? Have you
> handled this as well ?
> 
> --- Lucas King <lking at fp.fairfax.com.au> wrote:
> > 
> > int child_process( int fd )
> > {
> >     if ( ( fd = dup2( 0, fd ) ) < 0 ) return 1;
> >     if ( ( fd = dup2( 0, fd ) ) < 0 ) return 1;






More information about the linuxCprogramming mailing list