From owner-freebsd-bugs Thu Jun 11 16:20:46 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA27079 for freebsd-bugs-outgoing; Thu, 11 Jun 1998 16:20:46 -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 QAA26949 for ; Thu, 11 Jun 1998 16:20:22 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id QAA17879; Thu, 11 Jun 1998 16:20:02 -0700 (PDT) Received: from ns.dsms.com (dsms.jsnet.com [207.82.57.142]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA25682 for ; Thu, 11 Jun 1998 16:15:04 -0700 (PDT) (envelope-from hbarker@dsms.com) Received: from fs.sm.dsms.com (hbarker@fs.sm.dsms.com [199.89.215.10]) by ns.dsms.com (8.8.5/8.8.4) with ESMTP id QAA20455 for ; Thu, 11 Jun 1998 16:15:03 -0700 (PDT) Received: (from hbarker@localhost) by fs.sm.dsms.com (8.8.8/8.8.4sm1) id QAA24843; Thu, 11 Jun 1998 16:15:02 -0700 (PDT) Message-Id: <199806112315.QAA24843@fs.sm.dsms.com> Date: Thu, 11 Jun 1998 16:15:02 -0700 (PDT) From: harold barker Hbarker Reply-To: hbarker@dsms.com To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: bin/6919: can not run multiple instances of /sbin/restore because temp files are not unique Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 6919 >Category: bin >Synopsis: can not run multiple instances of /sbin/restore because temp files are not unique >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jun 11 16:20:01 PDT 1998 >Last-Modified: >Originator: harold barker & >Organization: dsms >Release: FreeBSD 2.2.6-STABLE i386 >Environment: FreeBSD build2.jsnet.com 2.2.6-STABLE FreeBSD 2.2.6-STABLE #0: Mon Jun 8 15:26:54 PDT 1998 hbarker@build.jsnet.com:/usr/src/sys/compile/dsms226aCAM i386 >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: >Fix: cvs diff: Diffing . Index: dirs.c =================================================================== RCS file: /d0a/cvs_root_freebsd/src/sbin/restore/dirs.c,v retrieving revision 1.6.2.1 diff -r1.6.2.1 dirs.c 146c146,147 < --- > pid_t pid; > 148c149,151 < (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); >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message