From owner-freebsd-bugs Sat Feb 22 21:10:03 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id VAA17981 for bugs-outgoing; Sat, 22 Feb 1997 21:10:03 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id VAA17973; Sat, 22 Feb 1997 21:10:01 -0800 (PST) Date: Sat, 22 Feb 1997 21:10:01 -0800 (PST) Message-Id: <199702230510.VAA17973@freefall.freebsd.org> To: freebsd-bugs Cc: From: Mike Pritchard Subject: Re: bin/2304 Reply-To: Mike Pritchard Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk The following reply was made to PR bin/2304; it has been noted by GNATS. From: Mike Pritchard To: freebsd-gnats-submit Cc: Subject: Re: bin/2304 Date: Sat, 22 Feb 1997 21:09:20 -0800 (PST) > `mkdir -p dir' ignores the return value for the last > path component. > > > >How-To-Repeat: > > $ mkdir -p /var/mkdir/dir; echo $? > mkdir: /var/mkdir: Permission denied > 1 > > ok, but: > $ mkdir -p /var/mkdir; echo $? > 0 > > should be '1' and print 'Permission denied' > > > >Fix: > > The bug exists since revision 1.2 mkdir.c 1994/09/08 author: jkh > >Audit-Trail: > > From: asami@cs.berkeley.edu (Satoshi Asami) > To: FreeBSD-gnats@freefall.freebsd.org, wosch@cs.tu-berlin.de > Cc: Subject: Re: bin/2304: mkdir -p > Date: Mon, 6 Jan 1997 21:30:46 -0800 (PST) > > * ok, but: > * $ mkdir -p /var/mkdir; echo $? > * 0 > * > * should be '1' and print 'Permission denied' > > Be careful here though, if we return errors for "directory already > exists", it's going to break a lot of ports. > > We thought this was a "feature". ;) > > Satoshi Maybe it should only ignore the error if errno == EEXIST? Does POSIX or the like have anything to say on the matter? -- Mike Pritchard mpp@FreeBSD.org "Go that way. Really fast. If something gets in your way, turn"