NetBSD Problem Report #831
From gnats Tue Feb 28 17:40:24 1995
Received: from pain.lcs.mit.edu (pain.lcs.mit.edu [128.52.46.239]) by sun-lamp.cs.berkeley.edu (8.6.10/8.6.10) with ESMTP id RAA00231 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Tue, 28 Feb 1995 17:40:23 -0800
Message-Id: <199503010124.MAA00701@hobbit.dn.itg.telecom.com.au.>
Date: Wed, 1 Mar 1995 12:24:57 +1100
From: "Simon J. Gerraty" <sjg@hobbit.dn.itg.telecom.com.au>
Reply-To: sjg@hobbit.dn.itg.telecom.com.au
To: gnats-bugs@NetBSD.ORG
Subject: mkdir -p complains
X-Send-Pr-Version: 3.2
>Number: 831
>Category: bin
>Synopsis: mkdir -p /usr/obj/cat complains if dir exits
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Feb 28 17:50:03 +0000 1995
>Closed-Date: Wed Mar 01 00:10:04 +0000 1995
>Last-Modified:
>Originator: Simon J. Gerraty
>Release: NetBSD-1.0 and Jan08-current
>Organization:
Zen Programming...
>Environment:
System: NetBSD hobbit 1.0A NetBSD 1.0A (VOLVOX) #1: Mon Jan 9 16:34:08 MET 1995 pk@chroom:/usr/src/sys/arch/sparc/compile/VOLVOX sparc
>Description:
make obj uses mkdir -p to ensure that /usr/obj/* exist.
However, mkdir -p complains and exit(1)s if dir exists.
I don't know about POSIX, but SunOS and HP/UX certainly
do not behave this way.
>How-To-Repeat:
# cd /usr/src/bin/cat
# make obj
# make obj
>Fix:
*** bin/mkdir/mkdir.c.~1~ Tue Nov 22 08:20:47 1994
--- bin/mkdir/mkdir.c Wed Mar 1 12:21:39 1995
***************
*** 113,120 ****
--- 113,122 ----
continue;
}
if (mkdir(*argv, omode) < 0) {
+ if (pflag == 0 || errno != EEXIST) {
warn("%s", *argv);
exitval = 1;
+ }
}
}
exit(exitval);
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->analyzed
State-Changed-By: jtc
State-Changed-When: Tue Feb 28 23:49:10 1995
State-Changed-Why:
Our simpler (and correct) implementation was lost when mkdir was lost when
mkdir was merged with 4.4lite. I'm going to revert to the working version.
State-Changed-From-To: analyzed->closed
State-Changed-By: jtc
State-Changed-When: Wed Mar 1 00:10:04 1995
State-Changed-Why:
Fixed.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.