Paul Jarc wrote: >Derek Robert Price <[EMAIL PROTECTED]> wrote: > > >>Any suggestions on how I'd detect that stderr and stdout point at >>the same file? Preferrably in some cross-platform manner. >> >> > >fstat() them and compare the device and inode numbers. > > >paul > >
On my system, the device and inode number are the same in the initial state - I assume because both stderr and stdout are being sent to the same tty, but I assume they have different file table entries in the kernel because stderr can be set to nonblock without doing the same to stdout. I need to know when the two file descriptors point to the same file table entry (i.e. $ cvs <whatever> 2>&1). The flags available via fcntl() appear to be identical in both cases as well. Derek -- *8^) Email: [EMAIL PROTECTED] Get CVS support at http://ximbiot.com -- I will not say "Springfield" just to get applause. I will not say "Springfield" just to get applause. I will not say "Springfield" just to get applause... - Bart Simpson on chalkboard, _The Simpsons_ _______________________________________________ Bug-cvs mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-cvs