View Single Post

   
  #4 (permalink)  
Old 02-15-2008, 04:10 PM
Bela Lubkin
 
Posts: n/a
Default Re: UW7: strange return code of mkdir(1)

Klaus Heinz wrote:

> I have noticed that 'mkdir -p a/b/c/d' creates the missing directories
> but returns '2' if either a, b, c or d exists beforehand (Unixware
> 7.1.1).
>
> Is this expected behaviour on Unixware or has this changed in later
> versions?


I tested this on UW714 and it returned 0:

$ cd /tmp
$ rm -rf a
$ mkdir -p a/b/c/d; echo $?
0
$ mkdir -p a/b/c/d; echo $?
0
$ rm -rf a
$ touch a
$ mkdir -p a/b/c/d; echo $?
UX:mkdir: ERROR: Cannot create directory "a/b/c/d": Not a directory
2

From the source, it appears that this changed some time between the
release of OpenUnix 8.0.0 (UW712) and the release of UnixWare 7.1.3.

>Bela<

Reply With Quote