[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#20241: Timezones should depend on debian-utils



According to Topi Miettinen:
> Miquel van Smoorenburg writes:
> > Well I'm not one for a living but it is one of my hobbies. This thread is
> > long enough as it is but I just can't resist. /bin/sh is a Posix shell,
> > so why not simply use:
> > 
> > set -C
> > : > /tmp/tempfile.$$ || exit 1
> > set +C
> > 
> > set -C causes a Posix shell to open files with O_EXCL
> 
> I thought so too until Richard Braakman enlightened me: bash checks if the
> file is regular file, if not, opens it without O_EXCL. Which is worse,
> zapping /etc/passwd or /dev/hda? :-(

You're kidding! I should ofcourse have investigated bash, but I once
wrote a Posix shell myself (years ago) [that's why I know about much of the
obscure Posix stuff] and I did use O_EXCL.

Grr. Sorry.

> Current bash scripts that use -C are broken. If this is fixed in some
> future version of bash, packages that use -C should declare a dependecy on
> bash >= xx. If they trust -C in installation scripts, change that to
> Pre-dependency, right?

So, who is going to file a bugreport against bash ? :)

Mike.
-- 
 Miquel van Smoorenburg | Our vision is to speed up time,
    miquels@cistron.nl  |   eventually eliminating it.


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: