Jean Delvare dixit:

>Dear mksh developers,

Feel free to use the singular ☺ we’re all just one person, be
it mksh, bash, ksh93, lynx, ncurses, xterm… all those projects
are done by one person (sometimes even the same).

>A customer of ours is migrating from ksh-93 to mksh. They reported the

Interesting, but, depending on the scripts, probably hard (lots
of other ksh93 extensions, such as float, will not be there either).

[ all parts of a pipeline are run in subshells ]
>I would like to ask if this is:
>
>1* A deliberate design decision, and this will never change.

An implementation choice, and while the status of this was
not set in stone for several years, some time ago (I’d have
to look when) I decided to make it into a formal language
feature, i.e. it will never change.

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


Dr. Werner Fink dixit:

>the mksh can use co-processes as ksh can do

Correct.

>Btw: this behaviour of the mksh is docmented in the manual page of

Correct.

>The question rises, if it would be possible to a) let the last pipe
>of the mksh not be a subshell and/or use shared memory area to make

No. There is no “shared memory” on many mksh targets, and one of the
biggest strength of mksh is that it behaves exactly the same across
all supported targets.

I think coprocesses are pretty usable for this in almost all cases
(I did have one where they weren’t, but you can still often background
a part, then play with fd redirection).

>Werner
>
>--
>  "Having a smoking section in a restaurant is like having
>          a peeing section in a swimming pool." -- Edward Burr

Ah, yours too ☺ so let me pick a different sig…

//mirabilos
-- 
Solange man keine schmutzigen Tricks macht, und ich meine *wirklich*
schmutzige Tricks, wie bei einer doppelt verketteten Liste beide
Pointer XORen und in nur einem Word speichern, funktioniert Boehm ganz
hervorragend.           -- Andreas Bogk über boehm-gc in d.a.s.r

Reply via email to