Re: silent semantic changes with reiser4

Christer Weinigel
2004-09-07T22:44:20Z

Gunnar Ritter <Gunnar.Ritter@pluto.uni-freiburg.de> writes:

> Excuse me, but there's really nothing broken here with POSIX and cp.
> You're just making an insulting talk about a part of the specification
> which currently serves GNU/Linux and other Unix-like environments very
> well, and has done so for about twelve years now.

"Broken" in the sense "POSIX mandates something that users wouldn't
expect".

> > cp could very well be modified to copy named streams except when
> > the option --posix is specified
>
> Hey, you didn't ever even have a look at POSIX Shell & Utilities, did
> you? Then why are you making derogatory statements about it?

Those derogatory statments are really all in your mind.

> > or the environment variale POSIXLY_CORRECT is set.
>
> Cool, data loss depending upon an environment variable which is even
> currently used by many programs unaware of such results. This really
> sounds like good engineering to me.

How would you consider cp to cause "data loss" if it _besides_ copying
the normal stream _also_ copied any named streams or xattrs belonging
to the stream? How would it cause data loss if cp started using a
theoretical copyfile syscall? It may not be 100% according to POSIX,
but I'd definitely say that it does what the user expects.

Lots of GNU utilities already differ from POSIX mandated behaviour
because the authors of those utilities belive that the POSIX mandated
behaviour is confusing.

http://www.wlug.org.nz/POSIXLY_CORRECT

POSIXLY_CORRECT is an environment variable that some programs use
to follow strict POSIX standards behaviour, where that isn't the
default.

Probably the most well-known example of this is that POSIX states
that filesystem blocks are 512 bytes per block, so the GNU
fileutils such as df(1) and GNU tar(1) use 512 if the variable
POSIXLY_CORRECT is set, and 1024 bytes per block by default.

Many of the GNU tools comply with POSIX by default, except for
where the author thinks the POSIX standard is wrong or dumb. :) As
a result, some programs also check if a variable named
POSIX_ME_HARDER is set as an acceptable alias for
POSIXLY_CORRECT. See Democracy Triumphs in Disk Units.

/Christer

--
"Just how much can I get away with and still go to heaven?"

Freelance consultant specializing in device driver programming for Linux
Christer Weinigel <christer@weinigel.se> http://www.weinigel.se