[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bash exit command should be unconditional
From: |
Vadym Chepkov |
Subject: |
bash exit command should be unconditional |
Date: |
Wed, 7 Apr 2010 06:37:32 -0700 (PDT) |
Hi,
I found out a very unusual feature of bash which makes it to act really
unexpected. I understand that pipelines are executed in a separate subshell,
but I really think 'exit' command should be absolute. Consider a trivial code:
#!/bin/bash
echo Start
ps -ef | while read proc
do
echo $proc
exit 1
done
echo Continue
I would expect never see "Continue" printed, I didn't put any conditional
checks to simplify the example, but I really expect the script to be completely
aborted when it gets to 'exit', not having to add additional checks or replace
pipeline with temporary files
Sincerely yours,
Vadym Chepkov
- bash exit command should be unconditional,
Vadym Chepkov <=
- 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