delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/06/10/06:52:16

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, 10 Jun 2003 12:51:55 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Slight patch for Cron
Message-ID: <20030610105155.GE3295@cygbert.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <Pine DOT LNX DOT 4 DOT 44 DOT 0306101118230 DOT 850-100000 AT localhost DOT localdomain> <Pine DOT GSO DOT 4 DOT 53 DOT 0306101145050 DOT 1165 AT domino DOT informatik DOT uni-kl DOT de>
Mime-Version: 1.0
In-Reply-To: <Pine.GSO.4.53.0306101145050.1165@domino.informatik.uni-kl.de>
User-Agent: Mutt/1.4.1i

On Tue, Jun 10, 2003 at 11:52:57AM +0200, Bjoern Kahl AG Resy wrote:
> > > +#ifdef __CYGWIN__
> > > +	{
> > > +	  int fd;
> > > +	  if ((fd = open("/dev/null", O_RDWR, 0)) != -1)
> > > +	    {
> > > +	      (void)dup2(fd, STDIN_FILENO);
> > > +	      (void)dup2(fd, STDOUT_FILENO);
> > > +	      (void)dup2(fd, STDERR_FILENO);
> > > +	      if (fd > 2)
> > > +		(void)close (fd);
> 
>  Should not this read :
> 
>    if ( (fd != STDIN_FILENO) && (fd != STDOUT_FILENO) & .. )
> 
>  If you already use symbolic constants for the file descriptors?
>  Just imagine a weird system, having e.g. STDOUT_FILENO defined
>  as 3. (I doubt, something like that exist, but who knows?)

There's only one weird system which has __CYGWIN__ defined...

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin AT cygwin DOT com
Red Hat, Inc.

--
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