mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-02 12:02:47 -05:00
New system for handling SSH signals.
This is in much the same style as the ttymodes revamp, using a header file which can be included in different ways to either iterate over _all_ the signals in the known list or just the ones for which a definition exists on the target OS. So this doesn't actually _remove_ the horrid pile of ifdefs in mainchan_rcvd_exit_signal, but at least it puts it somewhere less intrusive and more reusable.
This commit is contained in:
13
putty.h
13
putty.h
@ -211,11 +211,16 @@ typedef enum {
|
||||
|
||||
/*
|
||||
* Send a POSIX-style signal. (Useful in SSH and also pterm.)
|
||||
*
|
||||
* We use the master list in sshsignals.h to define these enum
|
||||
* values, which will come out looking like names of the form
|
||||
* SS_SIGABRT, SS_SIGINT etc.
|
||||
*/
|
||||
SS_SIGABRT, SS_SIGALRM, SS_SIGFPE, SS_SIGHUP, SS_SIGILL,
|
||||
SS_SIGINT, SS_SIGKILL, SS_SIGPIPE, SS_SIGQUIT, SS_SIGSEGV,
|
||||
SS_SIGTERM, SS_SIGUSR1, SS_SIGUSR2,
|
||||
|
||||
#define SIGNAL_MAIN(name, text) SS_SIG ## name,
|
||||
#define SIGNAL_SUB(name) SS_SIG ## name,
|
||||
#include "sshsignals.h"
|
||||
#undef SIGNAL_MAIN
|
||||
#undef SIGNAL_SUB
|
||||
|
||||
/*
|
||||
* These aren't really special commands, but they appear in the
|
||||
|
Reference in New Issue
Block a user