[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bash exit command should be unconditional
From: |
Eric Blake |
Subject: |
Re: bash exit command should be unconditional |
Date: |
Thu, 08 Apr 2010 07:19:28 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Lightning/1.0b1 Thunderbird/3.0.4 |
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 eblake@redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- bash exit command should be unconditional, Vadym Chepkov, 2010/04/07
- Re: bash exit command should be unconditional, Jan Schampera, 2010/04/08
- Re: bash exit command should be unconditional, Bob Proulx, 2010/04/08
- Re: bash exit command should be unconditional, Roman Rakus, 2010/04/08
- Re: bash exit command should be unconditional, Vadym Chepkov, 2010/04/08
- Re: bash exit command should be unconditional, Greg Wooledge, 2010/04/08
- Re: bash exit command should be unconditional, Bob Proulx, 2010/04/08
- Re: bash exit command should be unconditional, Greg Wooledge, 2010/04/08
- Re: bash exit command should be unconditional, Bob Proulx, 2010/04/08