Perl 3.0 t/op.mkdir: print ($! == 17 ? "ok 3\n" : "not ok 3\n");
Michael Greim
greim at sbsvax.UUCP
Sun Nov 12 01:18:05 AEST 1989
In article <190 at harald.UUCP>, jba at harald.ruc.dk (Jan B. Andersen) writes:
> Test 3 in op.mkdir fails.
>
> I seem to recall someone mentioned this before, but I don't remember
> what the solution was.
>
> This is on a NCR Tower Sys V.2 machine. I have #undef'ed some of the
> directory and password stuff in order to compile Perl.
The effect that you describe happens in the following configuration:
- you don't have a system call for mkdir. This is true for sys3/sys5
(before sys5 3.1 as far as I know) derived machines.
- the program mkdir does not return the error message in systems error strings.
The test is to see, whether the attempt fails to create a directory which
already exists.
As the system has no system call for mkdir, perl starts the program mkdir(1)
to create a directory then it reads the output from mkdir.
If perl gets any text from mkdir then it assumes that there was an error and
searches the systems error strings (on BSD systems included by perror from
standard C library, module errlst.o) to determine what error number to return.
As the program mkdir does not return a string from the list of error messages,
perl fails to find it, and assumes that everything was ok.
On my system here, I have the same problem. The string from errlst.o is
"Datei existiert" (= "file exists")
but "mkdir tmp" when tmp already exists, prints
"mkdir : Das Dateiverzeichnis tmp kann nicht eingerichtet werden"
This is on a computer by SIEMENS, they have changed a lot (but not all)
texts to German.
This is a bug in perl, but not a serious one. Maybe Larry Wall can fix it
in his next patch?
-mg
--
Michael Greim Email : greim at sbsvax.informatik.uni-saarland.dbp.de
or : ...!uunet!unido!sbsvax!greim
[.signature removed by the board of censors for electronic mail's main
executive computer because it contained a four letter word ("word")]
More information about the Comp.sources.bugs
mailing list