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.

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.

When you have the huge cpu usage, do a ``ps -A --forest'' and see what
owns the proces.

-- 
       _
     _|_|_
      ( )   *    Anton Graham
      /v\  /     <[EMAIL PROTECTED]>
    /(   )X
     (m_m)       GPG ID: 18F78541
Penguin Powered!

Reply via email to