Skip to content
Snippets Groups Projects
Commit 1d5c0cde authored by rswindell's avatar rswindell
Browse files

Deuce's mod: no longer blocks signals while running externals on Unix

(needed for alarm signals in rz).
parent 3f2d547a
No related branches found
No related tags found
No related merge requests found
......@@ -56,14 +56,22 @@
#include <grp.h>
#endif
#define TTYDEFCHARS
#include <termios.h>
#endif
#define XTRN_IO_BUF_LEN 5000
#ifdef __solaris__
# define TTYDEF_IFLAG (BRKINT | ICRNL | IMAXBEL | IXON | IXANY)
# define TTYDEF_OFLAG (OPOST | ONLCR)
# define TTYDEF_LFLAG (ECHO | ICANON | ISIG | IEXTEN | ECHOE|ECHOKE|ECHOCTL)
# define TTYDEF_IFLAG (BRKINT | ICRNL | IMAXBEL | IXON | IXANY)
# define TTYDEF_OFLAG (OPOST | ONLCR)
# define TTYDEF_LFLAG (ECHO | ICANON | ISIG | IEXTEN | ECHOE|ECHOKE|ECHOCTL)
# define TTYDEF_CFLAG (CREAD | CS8 | HUPCL)
static cc_t ttydefchars[NCCS] = {
CEOF, CEOL, CEOL, CERASE, CWERASE, CKILL, CREPRINT,
CERASE2, CINTR, CQUIT, CSUSP, CDSUSP, CSTART, CSTOP, CLNEXT,
CDISCARD, CMIN, CTIME, CSTATUS, _POSIX_VDISABLE
};
#endif
/*****************************************************************************/
......@@ -1161,6 +1169,8 @@ int sbbs_t::external(char* cmdline, long mode, char* startup_dir)
term.c_iflag = TTYDEF_IFLAG;
term.c_oflag = TTYDEF_OFLAG;
term.c_lflag = TTYDEF_LFLAG;
term.c_cflag = TTYDEF_CFLAG;
term.c_cc = ttydefchars;
}
winsize.ws_row=rows;
// #warning Currently cols are forced to 80 apparently TODO
......@@ -1192,6 +1202,9 @@ int sbbs_t::external(char* cmdline, long mode, char* startup_dir)
}
}
if(pid==0) { /* child process */
sigset_t sigs;
sigfillset(&sigs);
sigprocmask(SIG_UNBLOCK,&sigs,NULL);
if(!(mode&EX_BIN)) {
static char term_env[256];
sprintf(term_env,"TERM=%s",startup->xtrn_term);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment