On Thu, May 18, 2000 at 01:56:45AM -0700, AG wrote:
>
> On Thu, 18 May 2000, Jan Houtsma wrote:
>
> | On Wed, May 17, 2000 at 03:40:51PM -0700, AG wrote:
> | > Hi Jan!
> | >
> | > On Wed, 17 May 2000, Jan Houtsma wrote:
> | >
> | > |
> | > | Another wierd thing.... It ONLY happens if i run the 'su - caroline'
> | > | via that script! If i start an xterm and manually run the 'su - caroline'
> | > | and then mutt, all IS nicely deleted after killingthe xterm.
> | > |
> | >
> | > I think it boils down to bash behavior. Running the script crates
> | > another instance of bash which then spawns yet another which isn't
> | > owned by you. Because xterm doesn't know about the shell created
> | > within the script it doesn't kill it.
> | >
> | Then explain why it does kill it when i run pine or elm instead of mutt????
> | And... I tried with both bash, zsh and ksh. They all do the same..
> |
> | I still do not understand.
>
> Assuming you mean you ran the script through each of those shells,
> (i.e changed the #! line), su is still going to use the shell defined
> as default for caroline. You still have a problem of a process
> running who's parent isn't in complete control. Because it was spawned
> essentially in a subshell of a subshell and isn't owned by you,
> closing your xterm doesn't necessarily have the authority to kill the
> process owned by caroline.
>
I changed the shell in /etc/passwd, so not via the #!/bin/zsh or
whatever.
>
> As far as pine and elm are concerned, perhaps they are more closely
> tied to their parent shell process and as a result when it dies they
> die.
>
Yea. obviously, cause there is clearly a difference with mutt in this
respect.
> When you have the huge cpu usage, do a ``ps -A --forest'' and see what
> owns the proces.
>
Thanks, i will try that tonight when i am home, but i can guess the
result and i think the end-result is that i would want mutt to
behave the same as pine and elm in respect to being killed when the
parent process dies independent on ownership. It must be possible cause
elm and pine also can. Better kill it than having a wild crazy process
which u can only kill manually with 'kill'.