Scott Blachowicz <[EMAIL PROTECTED]> writes:
> Dan Harkless <[EMAIL PROTECTED]> wrote:
>
> > Yeah, sorry. I know I should be checking the return value of the fopen()
> > there. I was planning to do that once I got everything working, but I
> > wasted so much time trying to hack the code to retain the standout
> > formatting for the prompt that I eventually had to draw the line and figure
> > someone else would take a look at this area when they cleaned up all the
> > code that assumes stdout is a terminal.
> >
> > I doubt there are many cron jobs out there that call [mh]show, however...
>
> What about something like
>
> rsh mailhost show
>
> (that wouldn't have a /dev/tty setup for it, would it?)
>
> or is that too perverted to worry about?
No, that's definitely less perverted than a cron job running show. I'd have
to look at the code again, but I got the impression that mhshow was using
fileno(stdout) because it didn't think stdin was a terminal. In any case,
if /dev/tty can't be opened, and stdin is known to be redirected, mhshow
shouldn't prompt.
-----------------------------------------------------------------------
Dan Harkless | To prevent SPAM contamination, please do not post this
[EMAIL PROTECTED] | private email address to the USENET or WWW. Thank you.