delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/10/28/09:56:44

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Tue, 28 Oct 2003 10:56:21 -0500
From: Christopher Faylor <cgf-rcm AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: 1.5.5-1: fprintf(stdout, ...) writes to serial port when used by apcupsd
Message-ID: <20031028155621.GA29657@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20031028031312 DOT GA9238 AT redhat DOT com> <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAoJt1vBbz40CDAg5sGRmjl8KAAAAQAAAAvgx1VnOX2UOsmIeuQDl05QEAAAAA AT alexanderweb DOT de>
Mime-Version: 1.0
In-Reply-To: <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAoJt1vBbz40CDAg5sGRmjl8KAAAAQAAAAvgx1VnOX2UOsmIeuQDl05QEAAAAA@alexanderweb.de>
User-Agent: Mutt/1.4.1i

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019