Hello!

On Wed, Apr 16, 2008 at 02:30:57PM +0200, Jim Meyering wrote:
> Eric Blake <[EMAIL PROTECTED]> wrote:
> > According to Jim Meyering on 4/16/2008 2:33 AM:
> > | This test would fail not only because the built-in mknod
> > | doesn't support -Z, but because it doesn't know about 'p' pipes.
> > |
> > |   tests: avoid mkdir/selinux failure when mknod is a shell built-in
> > |   * tests/mkdir/selinux: Skip the mknod test if it's a built-in.
> >
> > Couldn't you try to defeat the shell builtin by using a subshell and exec
> > to force the PATH lookup?  For example, on bash:
> >
> > $ printf --version | head -n1
> > bash: printf: --: invalid option
> > printf: usage: printf [-v var] format [arguments]
> > $ (exec printf --version) | head -n1
> > printf (GNU coreutils) 6.10
> 
> My first reaction was "great! that looks much better".
> Unfortunately, the technique doesn't work with that shell:
> 
>   openbsd$ ./mknod --version|head -1
>   mknod (GNU coreutils) 6.10.188-7cb24
>   openbsd$ PATH=. /bin/sh -c 'mknod --version'|head -1

                                ^ exec?


Regards,
 Thomas

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to