Jean Delvare dixit:

>I will check with the customer. The example they provided was clearly
>made up to illustrate the problem (and I do appreciate when customers
>make the problem easy to understand) so I don't know exactly what their
>actually script is doing.

Okay.

It’s probably better for all involved if actual script code
is worked on, but in this case, for a general inquiry, this
was good.

>Thanks for the hint. Customers are just starting to migrate, on our
>request (as it turns out that ksh-93 has a lot of bugs and upstream is
>hardly active so we did not feel like supporting it any more) and this
>is the first incompatibility I hear about.

I see.

>> Scripts can use this, e.g:
>>
>> # here, set +o foo is active
>> cat "$@" | while …; do set -o foo; …; done
>> # here, set +o foo is active again
>
>Sorry but I do not understand how this relate to the problem at hand?
>Just an illustration of another change in subshells that do not
>propagate to the main shell?

Yes, exactly. Since a few years, scripts may rely on this.
(Although the example is dated: functions defined with
“function” have function-local scope for shell options
since mksh R51, like recent ksh93 versions have.)

bye,
//mirabilos
-- 
„Cool, /usr/share/doc/mksh/examples/uhr.gz ist ja ein Grund,
mksh auf jedem System zu installieren.“
        -- XTaran auf der OpenRheinRuhr, ganz begeistert
(EN: “[…]uhr.gz is a reason to install mksh on every system.”)

Reply via email to