Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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 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: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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/