On 10/15/2012 11:00 PM, DJ Mills wrote:
I'm also not entirely sure what you mean by "errexit will always be
stored as off."

I mean that if I try to capture option state with, for example: opts=`set +o`,
the errexit status will be lost.

It's on there... Do you not understand that command substitution
creates a subshell?

I understand that command substitution is a subshell, however it acts
differently from, say, ( ) subshell in this regard.

What is the goal/problem that you're trying to solve?

I'm trying to implement a pair of functions that would save/restore option
state onto/from a stack, so I could modify options temporarily for some parts
of code. I've worked around this problem already and it is not the subject
of the original message. I just wanted to know if errexit being forced off in
a command substitution was inteded or if it was a bug and needed fixing.

Thank you.

Sincerely,
Nick

Reply via email to