Date: Fri, 12 Jun 1998 02:20:01 -0700 (PDT) From: njs3@doc.ic.ac.uk (Niall Smart) To: freebsd-bugs@FreeBSD.ORG Subject: Re: bin/6919: can not run multiple instances of /sbin/restore because temp files are not unique Message-ID: <199806120920.CAA21018@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/6919; it has been noted by GNATS. From: njs3@doc.ic.ac.uk (Niall Smart) To: hbarker@dsms.com, FreeBSD-gnats-submit@freebsd.org Cc: Subject: Re: bin/6919: can not run multiple instances of /sbin/restore because temp files are not unique Date: Fri, 12 Jun 1998 10:16:06 +0100 On Jun 11, 4:15pm, harold barker Hbarker wrote: } Subject: bin/6919: can not run multiple instances of /sbin/restore because > > >Description: > > /sbin/restore uses two files in /tmp. The names are not unique to each invocation, so it is not possible to run more than one restore at a give time. > > >How-To-Repeat: > > < (void) sprintf(dirfile, "%srstdir%d", _PATH_TMP, dumpdate); > --- > > pid = getpid(); > > > > (void) sprintf(dirfile, "%srstdir-%d-%d", _PATH_TMP, pid, dumpdate); > 164c167 > < (void) sprintf(modefile, "%srstmode%d", _PATH_TMP, dumpdate); > --- > > (void) sprintf(modefile, "%srstmode-%d-%d", _PATH_TMP, pid, dumpdate); Won't a call to mkstemp work here? Niall To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199806120920.CAA21018>