Simon McVittie dixit: >> as well as open("/dev/tty", O_RDWR, 0) > >Asserting that /dev/tty is the correct device node and has appropriate >permissions should cover that.
Totally not, unfortunately: it only works when it actually has a ctty. >> and later F_DUPFD and F_SETFD, FD_CLOEXEC fcntl > >Those are basic syscalls that act on any valid fd (not just terminals) >so if they somehow fail then we already have much, much worse problems. Yeah, these are granted. >> Perhaps isolating that as a small C or Perl program to use >> for those tests? > >It looks like even perl-base (which is Essential) should have >POSIX::isatty, so that's probably the most convenient. That and the builtin open to open /dev/tty ought to do, but I’m not a Perl monk, so feel free to ;-) Thanks, //mirabilos -- > Wish I had pine to hand :-( I'll give lynx a try, thanks. Michael Schmitz on nntp://news.gmane.org/gmane.linux.debian.ports.68k a.k.a. {news.gmane.org/nntp}#news.gmane.linux.debian.ports.68k in pine