main.c (9b9967924bb74dae6b202347407043821cd06fa0) | main.c (74457d3d4327f7169df5e5596a955d1862b76270) |
---|---|
1/* 2 * User Process PPP 3 * 4 * Written by Toshiharu OHNO (tony-o@iij.ad.jp) 5 * 6 * Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd. 7 * 8 * Redistribution and use in source and binary forms are permitted --- 148 unchanged lines hidden (view full) --- 157 signal(SIGCONT, TerminalCont); 158 raise(SIGSTOP); 159} 160 161static void 162BringDownServer(int signo) 163{ 164 /* Drops all child prompts too ! */ | 1/* 2 * User Process PPP 3 * 4 * Written by Toshiharu OHNO (tony-o@iij.ad.jp) 5 * 6 * Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd. 7 * 8 * Redistribution and use in source and binary forms are permitted --- 148 unchanged lines hidden (view full) --- 157 signal(SIGCONT, TerminalCont); 158 raise(SIGSTOP); 159} 160 161static void 162BringDownServer(int signo) 163{ 164 /* Drops all child prompts too ! */ |
165 server_Close(SignalBundle); | 165 if (server_Close(SignalBundle)) 166 log_Printf(LogPHASE, "Closed server socket\n"); |
166} 167 168static void | 167} 168 169static void |
170RestartServer(int signo) 171{ 172 /* Drops all child prompts and re-opens the socket */ 173 server_Reopen(SignalBundle); 174} 175 176static void |
|
169Usage(void) 170{ 171 fprintf(stderr, "Usage: ppp [-auto | -foreground | -background | -direct |" 172 " -dedicated | -ddial | -interactive]" 173#ifndef NOALIAS 174 " [-nat]" 175#endif 176 " [-quiet] [-unit N] [system ...]\n"); --- 189 unchanged lines hidden (view full) --- 366 sig_signal(SIGINT, CloseConnection); 367 sig_signal(SIGQUIT, CloseSession); 368 sig_signal(SIGALRM, SIG_IGN); 369 signal(SIGPIPE, SIG_IGN); 370 371 if (sw.mode == PHYS_INTERACTIVE) 372 sig_signal(SIGTSTP, TerminalStop); 373 | 177Usage(void) 178{ 179 fprintf(stderr, "Usage: ppp [-auto | -foreground | -background | -direct |" 180 " -dedicated | -ddial | -interactive]" 181#ifndef NOALIAS 182 " [-nat]" 183#endif 184 " [-quiet] [-unit N] [system ...]\n"); --- 189 unchanged lines hidden (view full) --- 374 sig_signal(SIGINT, CloseConnection); 375 sig_signal(SIGQUIT, CloseSession); 376 sig_signal(SIGALRM, SIG_IGN); 377 signal(SIGPIPE, SIG_IGN); 378 379 if (sw.mode == PHYS_INTERACTIVE) 380 sig_signal(SIGTSTP, TerminalStop); 381 |
382 sig_signal(SIGUSR1, RestartServer); |
|
374 sig_signal(SIGUSR2, BringDownServer); 375 376 lastlabel = argv[argc - 1]; 377 for (arg = label; arg < argc; arg++) { 378 /* In case we use LABEL or ``set enddisc label'' */ 379 bundle_SetLabel(bundle, lastlabel); 380 system_Select(bundle, argv[arg], CONFFILE, prompt, NULL); 381 } --- 254 unchanged lines hidden --- | 383 sig_signal(SIGUSR2, BringDownServer); 384 385 lastlabel = argv[argc - 1]; 386 for (arg = label; arg < argc; arg++) { 387 /* In case we use LABEL or ``set enddisc label'' */ 388 bundle_SetLabel(bundle, lastlabel); 389 system_Select(bundle, argv[arg], CONFFILE, prompt, NULL); 390 } --- 254 unchanged lines hidden --- |