zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: James Kirkpatrick <jimkirk@uwyo.edu>
Cc: zsh-workers@sunsite.auc.dk, Susan L Hanna <hanna@uwyo.edu>
Subject: Re: zsh 3.0.7 hogs memory
Date: Tue, 30 Nov 1999 16:03:51 +0000	[thread overview]
Message-ID: <991130160351.ZM5185@candle.brasslantern.com> (raw)
In-Reply-To: <Pine.GSO.4.10.9911300839310.20454-100000@asuwlink.uwyo.edu>

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


  reply	other threads:[~1999-11-30 16:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-23 18:08 "getopts" bugs and bad interactions with "shift" Bart Schaefer
1999-11-23 18:22 ` Adam Spiers
1999-11-23 21:40   ` Bart Schaefer
1999-11-23 22:17     ` zsh 3.0.7 hogs memory James Kirkpatrick
1999-11-24  5:35       ` Bart Schaefer
1999-11-24 16:25         ` James Kirkpatrick
1999-11-30 15:42         ` James Kirkpatrick
1999-11-30 16:03           ` Bart Schaefer [this message]
1999-11-23 20:36 ` "getopts" bugs and bad interactions with "shift" Zefram

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=991130160351.ZM5185@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=hanna@uwyo.edu \
    --cc=jimkirk@uwyo.edu \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).