delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/08/20/02:26:23

Date: Sun, 20 Aug 2000 09:28:42 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: kourino AT hotmail DOT com
Message-Id: <1438-Sun20Aug2000092841+0300-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.2.emacs20_6 I) and Blat ver 1.8.5b
CC: djgpp AT delorie DOT com
In-reply-to: <399F3B95.585EC230@hotmail.com> (message from the Icefalcon on
Sun, 20 Aug 2000 01:53:22 GMT)
Subject: Re: SIGTSTP
References: <399F3B95 DOT 585EC230 AT hotmail DOT com>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: the Icefalcon <kourino AT hotmail DOT com>
> Newsgroups: comp.os.msdos.djgpp
> Date: Sun, 20 Aug 2000 01:53:22 GMT
> 
> cl/cl_funcs.c uses it in the nvi source. A page describes it as "an
> interactive stop signal" that can be handled or ignored (unlike
> SIGSTOP), but in a different place it also says that the SUSP character
> that usually causes SIGTSTP to be sent is "recognized only if the
> implementation supports job control". I'm guessing DJGPP doesn't ... ?

SIGTSTP is a signal that is generated when you press Ctrl-Z on a Unix
terminal.  (Ctrl-Z is the default SUSP character.)  It causes the
current program to be suspended, and switches to a background program
(usually, the shell), until you type "fg" to resume the stopped
program.

DJGPP doesn't support SIGTSTP, although the termios emulation can
emulate this by launching a subsidiary shell (you need to type "exit"
to return).

> For the
> moment I'm just throwing in a -DSIGTSTP=SIGABRT to the makefile since
> there's also no SIGSTOP (since no job control) ... This is safe, right?

No, it isn't safe, unless you like your programs to crash ;-)

SIGABRT aborts the program with a stack traceback, so it is not a good
replacement for SIGTSTP.  It's much better to define away the related
code like this:

  #ifdef SIGTSTP
  ... code that uses SIGTSTP ...
  #endif

Alternatively, you could use the termios emulation of SIGTSTP
described above.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019