SOURCES: zm-init (NEW) - init script "Copyright (C) 2005 Serg
Oskin"
Jakub Bogusz
qboosh at pld-linux.org
Tue Apr 19 13:20:01 CEST 2005
On Tue, Apr 19, 2005 at 08:29:46AM +0200, Adam Gołębiowski wrote:
> On Tue, Apr 19, 2005 at 08:37:58AM +0300, Elan Ruusamäe wrote:
> > On Tuesday 19 April 2005 03:49, hunter wrote:
> > > +sql=/tmp/zm.crdb.sql
> > > +echo "" >$sql
> > > +chmod 600 $sql
> >
> > race possible.
> > TMPDIR not accounted.
> > use mktemp or sth similiar.
> >
> > sql=$(mktemp ${TMPDIR:-/tmp}/sqlXXXXXX) || exit 1
>
> Btw, does mktemp work for you? It has a problem with mkstemp() on my
> machine, it allways returns -1.
>
> $ cat mkstemp.c
> #include <stdio.h>
> #include <stdlib.h>
>
> int main(void) {
> if (mkstemp("/tmp/sql.XXXX") < 0)
man mkstemp
--
Jakub Bogusz http://cyber.cs.net.pl/~qboosh/
More information about the pld-devel-en
mailing list