Subject: Re: mkstemp() core dump
To: None <>
From: Lennart Augustsson <>
List: current-users
Date: 09/02/1999 18:16:23
Patrick Welche wrote:

> Am I the only one having problems with mkstemp?
> Program received signal SIGSEGV, Segmentation fault.
> 0x8053c9e in __gettemp (path=0x805dcc6 "/tmp/dico.XXXX", doopen=0xefbfc204,
>     domkdir=0) at /usr/src/lib/libc/stdio/gettemp.c:83
> 83                      *--trv = xtra[0];

Just checking for trivial mistakes now, you haven't passed a string literal to
mkstemp(), have you?
mkstemp("/tmp/dico.XXXX") will fail since the argument is modified, but
string literals are read-only.


        -- Lennart