From owner-freebsd-bugs Fri Jun 12 02:20:54 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA19086 for freebsd-bugs-outgoing; Fri, 12 Jun 1998 02:20:54 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA19011 for ; Fri, 12 Jun 1998 02:20:28 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id CAA21018; Fri, 12 Jun 1998 02:20:01 -0700 (PDT) Date: Fri, 12 Jun 1998 02:20:01 -0700 (PDT) Message-Id: <199806120920.CAA21018@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.ORG From: njs3@doc.ic.ac.uk (Niall Smart) Subject: Re: bin/6919: can not run multiple instances of /sbin/restore because temp files are not unique Reply-To: njs3@doc.ic.ac.uk (Niall Smart) Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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