Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh 3.0.7 hogs memory
- X-seq: zsh-workers 8825
 
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
 
- To: James Kirkpatrick <jimkirk@xxxxxxxx>
 
- Subject: Re: zsh 3.0.7 hogs memory
 
- Date: Tue, 30 Nov 1999 16:03:51 +0000
 
- Cc: zsh-workers@xxxxxxxxxxxxxx, Susan L Hanna <hanna@xxxxxxxx>
 
- In-reply-to: <Pine.GSO.4.10.9911300839310.20454-100000@xxxxxxxxxxxxxxxxx>
 
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
 
- References: <Pine.GSO.4.10.9911300839310.20454-100000@xxxxxxxxxxxxxxxxx>
 
On Nov 30,  8:42am, James Kirkpatrick wrote:
} Subject: Re: zsh 3.0.7 hogs memory
}
} I tried the TRAPHUP and that does indeed seem to solve the problem.
} However, it seems more of an experiment than a true fix.
Yes.
} Does this give you enough to work towards a proper fix, or should I do
} more to characterize the problem (e.g. try one of the other two
} suggestions)?
Please try applying the patch and recompiling.  (And then be sure to remove
the TRAPHUP before you test it.)  The TRAPHUP experiment confirms that it's
a signal-handling issue rather than simply EOF-on-stdin, but it doesn't
entirely confirm my hypothesis about the SIGHUP loop.
Another thing that I just thought of:  It might be an interaction between
SIGHUP and SIGCHLD handlers; possibly saving of the histfile delays zsh's
exit just enough for the signal from the exiting Pine to arrive, or to
arrive in a different part of the shutdown.  (Anybody else have a guess?)
} > Index: Src/signals.c
} > ===================================================================
} > @@ -540,7 +540,8 @@
} >          if ((from_signal || i != thisjob) && (jobtab[i].stat & STAT_LOCKED) &&
} >              !(jobtab[i].stat & STAT_NOPRINT) &&
} >              !(jobtab[i].stat & STAT_STOPPED)) {
} > -            if (killpg(jobtab[i].gleader, SIGHUP) != -1)
} > +            if (jobtab[i].gleader != getpid() &&
} > +		killpg(jobtab[i].gleader, SIGHUP) != -1)
} >                  killed++;
} >          }
} >      if (killed)
} > 
} > I'll be a bit concerned about other signal-handling issues if that really
} > does fix it, though.
-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com
Messages sorted by:
Reverse Date,
Date,
Thread,
Author