-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Bruno Haible on 5/24/2007 4:08 AM: >> if (PeekNamedPipe ((HANDLE) _get_osfhandle (fd), NULL, 0, NULL, NULL, >> NULL)) > > But there are other types of devices as well, such as special character > devices (COM: and consoles). It looks safer to include only the regular > files: > GetFileType ((HANDLE) _get_osfhandle (fd)) == FILE_TYPE_DISK.
At the same time, NUL (corresponding to /dev/null) should appear to be seekable, even though it is a character device and is always at position 0. Is mingw's fstat reliable enough to get any of this information, or does it take native Windows calls like this thread has been suggesting? - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGVX/184KuGfSFAYARAolAAJ9RGm8IBjy/Y7G1BG8nTcDAkjsvOQCfTVPm tAIRfVdZBwJdOdyHDSD+S5Q= =AvH/ -----END PGP SIGNATURE-----