>
>Hi!
>
>----
>
>Is there a way to detect whether a fd refers to "/dev/null" based on the
>return values of |stat()| ?

Sure, stat("/dev/null") and compare the fields:

        st_mode (the type of the file, must be a char device)

        st_rdev (the major, minor of the device), note: "st_*r*dev", not
                st_dev.

Casper

Reply via email to