https://bugzilla.novell.com/show_bug.cgi?id=436963 User pbaudis@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=436963#c2 Petr Baudis <pbaudis@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pbaudis@novell.com --- Comment #2 from Petr Baudis <pbaudis@novell.com> 2008-10-24 02:02:05 MDT --- /dev/tty is the controlling tty if the process has any, just try to open() it - if it fails (with -ENXIO), you have no controlling tty either. So the general idea would be probably something like: ask_fd = 0; if (!isatty(ask_fd)) ask_fd = open("/dev/tty", O_RDWR); if (ask_fd < 0) die("no way how to ask for confirmation"); ask(ask_fd); -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.