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 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Subject: RE: mkstemp bug Date: Wed, 27 Apr 2005 15:03:10 -0500 Message-ID: <5C7554D82F4671478985015814A65B77EB2551@UEEXCHANGE.evansville.edu> X-MS-Has-Attach: X-MS-TNEF-Correlator: From: "Richardson, Anthony" To: , X-OriginalArrivalTime: 27 Apr 2005 20:04:38.0646 (UTC) FILETIME=[577BA160:01C54B64] Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id j3RK6aEa010888 Sam Steingold: > > * Tony Richardson > > I'm surprised your example doesn't segfault. My Linux man page says > > explicitly that the template should not be a string > constant but must > > be a character array, i.e. use > > > > char t1[] = "/tmp/clisp-x-io-XXXXXX"; > > char t2[] = "/tmp/clisp-x-io-XXXXXX"; > > char t3[] = "/tmp/clisp-x-io-XXXXXX"; > > > > mkstemp(t1); > > mkstemp(t2); > > mkstemp(t3); > > > > instead. > > that's what I did. I was sloppy in my posting. > the strings passed to mkstemp where explicitly allocated with > alloca and > properly filled. I'm sorry for misreading your post. I can see that what you posted wasn't actual code. mkstemp() works fine for me though. Cygwin version 1.5.15 and Win XP. Tony -- 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/