[Gambas-devel] Problems with Process and bash replacement

Benoit Minisini gambas at ...1...
Tue Dec 12 20:51:09 CET 2006


On Friday 08 December 2006 17:24, José Luis Redrejo wrote:
> Hi all,
> in some distributions bash is being replaced by dash to speed up the start
> up of the system.
> It seems that bash is overbloated and things go faster using dash.
> So they are linking /bin/sh to /bin/dash instead of /bin/bash
>
> Testing it I've noticed is a little faster (not apreciable in fast
> computers but it's much better in slow ones).
> So the replacement could be a good thing.... unless you're a gambas
> programmer and use to be a SHELL fan.
>
> This code doesn't work properly using dash as replacement to bash:
>
> Dim stuffProcess AS Process
>     TRY stuffProcess = SHELL ("whatever you like")
>     TRY stuffProcess.Kill
>      stuffProcess = NULL
>
>
> After executing it I can see as "sh" is killed, but "whatever you like" is
> still alive. Using bash, both sh & "whatever you like" are killed.
>
> I know this is not a real gambas bug, probably is due to the limitations of
> dash,
> but we are going to deal with it sooner or later, so if anybody has any
> idea on how to do it, or if Benoît knows how to solve it
> thinking in the future, any help is welcome.
>

Apparently, this is a bash behaviour that kill all its children when receiving 
a SIGKILL signal. The question is why don't dash have the same behaviour?

-- 
Benoit Minisini





More information about the Devel mailing list