Submitter | Jun Wu |
---|---|
Date | April 10, 2016, 12:31 a.m. |
Message ID | <a212504cf958742becab.1460248283@x1c> |
Download | mbox | patch |
Permalink | /patch/14477/ |
State | Superseded |
Commit | b89e4457fa865ee6596157fe7b98639c1c39655e |
Delegated to: | Yuya Nishihara |
Headers | show |
Comments
Jun Wu wrote:
> terminal window will mass up its content.
mass => mess
On Sun, 10 Apr 2016 01:31:23 +0100, Jun Wu wrote: > # HG changeset patch > # User Jun Wu <quark@fb.com> > # Date 1460248132 -3600 > # Sun Apr 10 01:28:52 2016 +0100 > # Node ID a212504cf958742becab6fe518dab9b838f5bbf4 > # Parent d54a7410307fa7aef41fdc49b027a96fdf28f030 > chg: forward SIGWINCH to worker > > Before this patch, if the user uses chg and ncurse interface, resizing the > terminal window will mass up its content. s/ncurse/ncurses/ > --- a/contrib/chg/chg.c > +++ b/contrib/chg/chg.c > @@ -388,11 +388,13 @@ > if (sigaction(SIGTERM, &sa, NULL) < 0) > goto error; > > - /* propagate job control requests to worker */ > + /* propagate important signals to worker */ This would make the comment less important. Can you add a separate block with more explicit comment? /* propagate window resize to ncurses */ ... /* propagate job control ... */
Patch
diff --git a/contrib/chg/chg.c b/contrib/chg/chg.c --- a/contrib/chg/chg.c +++ b/contrib/chg/chg.c @@ -388,11 +388,13 @@ if (sigaction(SIGTERM, &sa, NULL) < 0) goto error; - /* propagate job control requests to worker */ + /* propagate important signals to worker */ sa.sa_handler = forwardsignal; sa.sa_flags = SA_RESTART; if (sigaction(SIGCONT, &sa, NULL) < 0) goto error; + if (sigaction(SIGWINCH, &sa, NULL) < 0) + goto error; sa.sa_handler = handlestopsignal; sa.sa_flags = SA_RESTART; if (sigaction(SIGTSTP, &sa, NULL) < 0)