Mail Archives: djgpp/2000/08/20/02:26:23
> 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 -