This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 1.5.5-1: fprintf(stdout, ...) writes to serial port when used by apcupsd


On Tue, Oct 28, 2003 at 10:27:23AM +0100, Alexander Schremmer wrote:
>Christopher Faylor wrote:
>> This is not a cygwin problem.  It is a problem with a program 
>> that assumes that it has a valid stdout.  It is perfectly
>> possible that a program can be started with no stdout, stdin, or stderr.
>
>The author said that it must a problem of cygwin ...

The author is wrong.  It happens.

You can probably get the same behavior from:

#!/bin/sh
exec 0<&- 1>&-
apcupsd

>Is it enough to call ftell(stdout) and check for != -1 to check for a valid
>stdout? Then I'd submit that patch to apcupsd.

Why don't you verify this for yourself rather than ask for corroboration
from people who have never used the program?  There is no magic here.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]