[EMAIL PROTECTED] wrote:

> >If stderr is a tty and you cannot read ftom stderr something is broken ,-)
>
>
> Typically, the world starts with:
>
>       fd = open("/dev/xxx", O_RDWR);
>       dup(fd);
>       dup(fd);
>
> which gets you fd 0, 1 and 2 connected r/w on your tty.
>
> But there's nothing that makes the following invalid:
>
>       fd = open("/dev/xxx", O_RDONLY);
>       dup(fd);
>       fd2 = open("/dev/xxx", O_WRONLY);

This has been discussed on the POSIX mailing list a while ago.
stderr is expected to be readable in the default case where stderr 
is connected to the controlling tty.

Jörg

-- 
 EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353 Berlin
       [EMAIL PROTECTED]                (uni)  
       [EMAIL PROTECTED]     (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily
_______________________________________________
opensolaris-discuss mailing list
[email protected]

Reply via email to