Hi!
4-Авг-2004 16:47 [EMAIL PROTECTED] (Eric Auer) wrote to
[EMAIL PROTECTED]:
EA> Hi! I suggest using isatty:
EA> write(isatty(1) ? 1 : 2, "format (YES/NO)? ", 17);
EA> The above example would show the confirm prompt on STDERR if STDOUT is
EA> redirected to a non-tty.
There may be trouble with redirection to NUL, which is also device. As
I post earlier, Eugeny Roshal checks if ioctl(1,0) == 0x83 (but I suggest,
that enough to test 0x82).
EA> I guess CTTY devices are always TTYs, though.
EA> By the way, as far as I know, *only* COMn/AUX/CON can be CTTY targets.
EA> Now about CLS/... handling: Because CTTY is handled by FreeCOM itself,
No. FreeCOM may be _re_called (for example, by system()) with already
redirected handles by parent shell.
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Freedos-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-devel