[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Command substitution and errexit
|
From: |
Nikolai Kondrashov |
|
Subject: |
Command substitution and errexit |
|
Date: |
Mon, 15 Oct 2012 18:23:06 +0300 |
|
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.7) Gecko/20120922 Icedove/10.0.7 |
Hi everyone,
I've noticed that errexit is disabled inside command substitution.
Is this intentional?
It makes it hard to save and restore errexit state. I.e. you can't simply say
opts=`set +o`, because errexit will always be stored as off. What's
interesting, $SHELLOPTS shows it still on inside the command substitution.
Sincerely,
Nick