Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Oct 2001 18:26:39 +0300
From:      Peter Pentchev <roam@ringlet.net>
To:        June Carey <carey_june@hotmail.com>
Cc:        bugs@freebsd.org
Subject:   Re: FreeBSD-4.3/ncurses
Message-ID:  <20011017182639.D1368@straylight.oblivion.bg>
In-Reply-To: <F157Qgt4pYZPSSj9m8700012a32@hotmail.com>; from carey_june@hotmail.com on Wed, Oct 17, 2001 at 03:00:54PM %2B0000
References:  <F157Qgt4pYZPSSj9m8700012a32@hotmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Oct 17, 2001 at 03:00:54PM +0000, June Carey wrote:
> Hi all,
> 
> Whilst recently writing a program which uses ncurses, I discovered a 
> behaviour which appears to be a bug.
> 
> It's a fairly "normal" program which divides the screen into 3 windows.
> If programming details are required, I can supply some.
> 
> The "bug": When I type control-y/^Y, the program stops in exactly the same 
> way as when I type control-z/^Z. I checked the manual page, and no mention 
> of anything to do with this appears there.

This is not really a bug.  If you do 'stty -a' to see all the terminal
control characters' current settings, you will most probably see that
the 'dsusp' control is mapped to ^Y.  A look at the stty(1) manual page
lists 'dsusp' as 'DSUSP character' with a cross-reference to termios(4)
at the end of the page.  A look at termios(4) and a search for 'DSUSP'
comes up with:

     DSUSP   Has similar actions to the SUSP character, except that the
             SIGTSTP signal is delivered when one of the processes in the
             foreground process group issues a read() to the controlling ter-
             minal.

In other words, DSUSP is something like 'delayed suspension'; it does not
suspend the running program the moment it is pressed, but only when
the running program finally finishes with what it is doing and gets around
to reading from the input terminal.  Since your program is probably
waiting for user input all the time, SUSP and DSUSP are equivalent.

Hope this clears things up :)

G'luck,
Peter

-- 
You have, of course, just begun reading the sentence that you have just finished reading.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011017182639.D1368>