weechat / weechat

The extensible chat client.
https://weechat.org
GNU General Public License v3.0
2.92k stars 327 forks source link

irssi-like suspend/resume on SIGSTOP/SIGCONT and ctrl-z/fg #985

Closed specing closed 1 year ago

specing commented 7 years ago

Currently weechat does not suspend on CTRL-Z and upon resuming (after SIGSTOP/SIGCONT) one has to manually issue /redraw.

Required info:

flashcode commented 7 years ago

I just checked, sending SIGTSTP (which is better than SIGSTOP because it can be handled by the application) will stop the process. So WeeChat will not reply to IRC servers on ping, therefore you can be disconnected (if you stay too long time outside WeeChat in the terminal). Irssi has the same behavior, so you can be disconnected as well.

As a workaround, you can already bind yourself a key, for example on ctrl-Z:

/key bind ctrl-Z /eval /exec kill -TSTP ${info:pid}

Just issueing fg after that should refresh WeeChat properly.

I can still add a default way to do that (and a clean refresh on SIGCONT signal), but anyway I'm not sure it's a good idea to stop the WeeChat process like that.

specing commented 7 years ago

therefore you can be disconnected

That is intended

Pressin ctrl-z after that /key bind .... line results in help for kill being printed.

flashcode commented 7 years ago

Are you using at least WeeChat 1.7? The info "pid" has been added in 1.7 (1.7.1 or 1.8 is recommended though).

specing commented 7 years ago

WeeChat 1.4 apparently