On 04/08/2010 07:11 AM, Matias A. Fonzo wrote: > If I am right when you invoke bash as "/bin/sh" (/bin/sh -> bash). Bash > runs in POSIX mode.
Correct. But POSIX allows shells to decide whether or not commands in pipelines operate in the current shell or a subshell. > >> I certainly have chosen the subject wrong, but I don't want to start a new >> thread now. Please let me backpedal a bit and describe the problem I am >> trying to solve. >> >> A company I work for is trying to migrate their applications to Linux >> platform and have selected RedHat as the vendor. Redhat installs bash as >> the standard shell : >> $ ls -l /bin/sh >> lrwxrwxrwx 1 root root 4 Jul 7 2009 /bin/sh -> bash >> >> Now, because of the feature in question, scripts that utilize standard >> /bin/sh don't work properly. That just means that their scripts are not POSIX compliant. They are making assumptions (such as exit in a pipeline operating in the current environment) that are not supported by POSIX. It does not mean that bash has to change behavior. Unfortunately, it could also mean fixing a lot of broken scripts. -- Eric Blake ebl...@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature