Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Feb 1997 21:10:01 -0800 (PST)
From:      Mike Pritchard <mpp>
To:        freebsd-bugs
Subject:   Re: bin/2304
Message-ID:  <199702230510.VAA17973@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/2304; it has been noted by GNATS.

From: Mike Pritchard <mpp>
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"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199702230510.VAA17973>