[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] RFC: should nano respond to a SIGCONT?

From: Benno Schulenberg
Subject: Re: [Nano-devel] RFC: should nano respond to a SIGCONT?
Date: Thu, 25 May 2017 12:05:35 +0200

On Wed, May 24, 2017, at 21:28, David Ramsey wrote:
> Benno Schulenberg:
> > When doing that, the contents of the current file are displayed again,
> > the cursor has returned to its former place, but nano is not actually
> > active: the shell still has control of the terminal -- which becomes
> > obvious when you type <Up> a few times.
> nano's not being active in terms of input is a problem, but removing the
> SIGCONT handler causes worse problems, at least here on Slackware 14.2
> with nano git (4781d4d) and that handler removed: if you suspend nano,
> resize the window you suspended nano in, and then send the nano process
> SIGCONT from another window, nano will not account for the changed
> window size as it did with the SIGCONT handler in place.

For me it was the other way around: if you put nano to sleep,
send it a SIGCONT from a different terminal, then resize the
window of the first terminal, and then foreground nano, the
changed size is not accounted for.

> Since the SIGCONT handler also keeps mouse support as it was before nano
> was suspended, if you were to toggle mouse support via escape sequence
> in the window you suspended nano in, this would cause similar breakage.

Okay.  So all of that stuff in the handler needs to be kept,
it just shouldn't be placed there.  See attached patch.

> Given this, the input problem should be fixed (I have no idea how,
> though), but the SIGCONT handler, or at least its equivalent
> functionality, shouldn't be removed.

I think the input problem should be fixed in the sense that
nano shouldn't wake up when stdin is not connected to anything.
So in effect it should ignore any SIGCONT that doesn't come
from the fg command.  Which is what the attached patch does.


-- - A fast, anti-spam email service.

Attachment: dont-wake-without-keyboard.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]