🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sources.bugs
Article #224

Re: Perl 3.0 t/op.mkdir: print ($! == 17 ? "ok 3\n" : "not ok 3\n");

#224
From: Michael Greim
Date: Sat, 11 Nov 1989 14:18
42 lines
2398 bytes
In article <190@harald.UUCP>, jba@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@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")]
Technical Details
Message-ID: <1449@sbsvax.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!samsung!uunet!mcsun!unido!sbsvax!greim
References: <190@harald.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!samsung!uunet!mcsun!unido!sbsvax!greim
From: greim@sbsvax.UUCP (Michael Greim)
Newsgroups: comp.sources.bugs
Subject: Re: Perl 3.0 t/op.mkdir: print ($! == 17 ? "ok 3\n" : "not ok 3\n");
Summary: This happens if mkdir is broken.
Message-ID: <1449@sbsvax.UUCP>
Date: 11 Nov 89 14:18:05 GMT
References: <190@harald.UUCP>
Organization: Universitaet des Saarlandes, Saarbruecken, W-Germany
Lines: 42