|
Lines 941-949
Link Here
|
| 941 |
void |
941 |
void |
| 942 |
sys_telnet_init() |
942 |
sys_telnet_init() |
| 943 |
{ |
943 |
{ |
|
|
944 |
struct sigaction act; |
| 944 |
(void) signal(SIGINT, intr); |
945 |
(void) signal(SIGINT, intr); |
| 945 |
(void) signal(SIGQUIT, intr2); |
946 |
(void) signal(SIGQUIT, intr2); |
| 946 |
(void) signal(SIGPIPE, deadpeer); |
947 |
/* We only want deadpeer to be called once, 'cause if there's a broken |
|
|
948 |
* pipe on stdout, we can't handle a SIGPIPE while reporting the |
| 949 |
* dropped connection. |
| 950 |
*/ |
| 951 |
act.sa_handler = deadpeer; |
| 952 |
sigemptyset(&act.sa_mask); |
| 953 |
act.sa_flags = SA_RESETHAND; |
| 954 |
(void) sigaction(SIGPIPE, &act, NULL); |
| 947 |
#ifdef SIGWINCH |
955 |
#ifdef SIGWINCH |
| 948 |
(void) signal(SIGWINCH, sendwin); |
956 |
(void) signal(SIGWINCH, sendwin); |
| 949 |
#endif |
957 |
#endif |