[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: avoid mkdir/selinux failure when mknod is a shell built-in
From: |
Jim Meyering |
Subject: |
Re: avoid mkdir/selinux failure when mknod is a shell built-in |
Date: |
Wed, 16 Apr 2008 15:25:58 +0200 |
Eric Blake <address@hidden> wrote:
> According to Jim Meyering on 4/16/2008 6:57 AM:
> | $ PATH=. /bin/sh -c 'exec mknod --version'|head -1
> | /bin/sh: mknod: --: unknown option
>
> Ouch - this looks like a POSIX compliance bug in exec; I'm adding
> bug-autoconf to the distribution in case we want to document this corner
> case bug in the shell portability section. POSIX states that exec is
> supposed to bypass shell builtins (and while special shell builtins, like
> 'exit', give undefined behavior when passed to exec, regular shell
> builtins, like 'fg', are required to exist in PATH even if they can't
> quite do as much work as their builtin counterpart). Do you know which
> shell heritage the OpenBSD /bin/sh derives from?
This is on 3.9 GENERIC#617 i386 OpenBSD,
and /bin/sh is a hard link to /bin/ksh.
"strings" says it's PDKSH:
PD KSH v5.2.14 99/07/13.2
> | $ PATH=. /bin/sh -c 'nice mknod --version' | head -1
> | mknod (GNU coreutils) 6.10.188-7cb24
>
> | So I'll go with nice.
>
> Sounds nice to me (sorry, couldn't resist :)
:)
- avoid mkdir/selinux failure when mknod is a shell built-in, Jim Meyering, 2008/04/16
- Re: avoid mkdir/selinux failure when mknod is a shell built-in, Eric Blake, 2008/04/16
- Re: avoid mkdir/selinux failure when mknod is a shell built-in, Matthew Woehlke, 2008/04/16
- Re: avoid mkdir/selinux failure when mknod is a shell built-in, Jim Meyering, 2008/04/16
- Re: avoid mkdir/selinux failure when mknod is a shell built-in, Jim Meyering, 2008/04/16
- Re: avoid mkdir/selinux failure when mknod is a shell built-in, Andreas Schwab, 2008/04/16