delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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: | Thu, 25 Aug 2005 23:46:38 +0200 |
From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Cc: | Samuel Thibault <samuel DOT thibault AT ens-lyon DOT org>, dave AT mielke DOT cc |
Subject: | Re: strerror(), errno and syslog() |
Message-ID: | <20050825214638.GX17452@calimero.vinschen.de> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com, Samuel Thibault <samuel DOT thibault AT ens-lyon DOT org>, dave AT mielke DOT cc |
References: | <20050825213422 DOT GQ7662 AT bouh DOT ens-lyon DOT fr> |
Mime-Version: | 1.0 |
In-Reply-To: | <20050825213422.GQ7662@bouh.ens-lyon.fr> |
User-Agent: | Mutt/1.4.2i |
On Aug 25 23:34, Samuel Thibault wrote: > Hi, > > This crashes (yes it's odd code, but it shouldn't crash): > > #include <syslog.h> > #include <errno.h> > > int main(void) { > errno = -1; > syslog(LOG_ERR,"foo"); > } > > Indeed, one of the first things that vsyslog does is > > char *errtext = strerror (get_errno ()); > int errlen = strlen (errtext); > > And it happens that the current implementation of strerror() returns > NULL on invalid errno. This is not posix compliant: posix says that This has been fixed a week ago. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |