This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: mkstemp bug


Sam Steingold:
> > * Tony Richardson <evpuneqfba@rinafivyyr.rqh>
> > 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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]