sleep => nointr_sleep
usleep => nointr_usleep (not just a #define) Already done by: ache
This commit is contained in:
parent
87bbffe22a
commit
9a571ec74e
@ -18,7 +18,7 @@
|
||||
* Columbus, OH 43221
|
||||
* (614)451-1883
|
||||
*
|
||||
* $Id: chat.c,v 1.32 1997/08/25 00:29:07 brian Exp $
|
||||
* $Id: chat.c,v 1.33 1997/08/31 22:59:15 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
* o Support more UUCP compatible control sequences.
|
||||
@ -148,10 +148,10 @@ ExpandString(char *str, char *result, int reslen, int sendmode)
|
||||
addcr = 0;
|
||||
break;
|
||||
case 'd': /* Delay 2 seconds */
|
||||
sleep(2);
|
||||
nointr_sleep(2);
|
||||
break;
|
||||
case 'p':
|
||||
usleep(250000);
|
||||
nointr_usleep(250000);
|
||||
break; /* Pause 0.25 sec */
|
||||
case 'n':
|
||||
*result++ = '\n';
|
||||
|
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: command.c,v 1.85 1997/09/25 00:52:33 brian Exp $
|
||||
* $Id: command.c,v 1.86 1997/10/12 01:49:37 brian Exp $
|
||||
*
|
||||
*/
|
||||
#include <sys/types.h>
|
||||
@ -167,7 +167,7 @@ DialCommand(struct cmdtab const * cmdlist, int argc, char **argv)
|
||||
break;
|
||||
}
|
||||
if ((res = DialModem()) == EX_DONE) {
|
||||
sleep(1);
|
||||
nointr_sleep(1);
|
||||
ModemTimeout();
|
||||
PacketMode();
|
||||
break;
|
||||
|
@ -15,7 +15,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: defs.h,v 1.19 1997/09/10 02:20:28 brian Exp $
|
||||
* $Id: defs.h,v 1.20 1997/10/23 21:32:48 ache Exp $
|
||||
*
|
||||
* TODO:
|
||||
*/
|
||||
@ -106,10 +106,8 @@ char *dstsystem;
|
||||
#endif
|
||||
|
||||
#ifdef SIGALRM
|
||||
#define sleep nointr_sleep
|
||||
#define usleep nointr_usleep
|
||||
u_int sleep(u_int sec);
|
||||
void usleep(u_int usec);
|
||||
u_int nointr_sleep(u_int sec);
|
||||
void nointr_usleep(u_int usec);
|
||||
#endif
|
||||
|
||||
#endif /* _DEFS_H_ */
|
||||
|
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: main.c,v 1.82 1997/10/07 00:56:57 brian Exp $
|
||||
* $Id: main.c,v 1.83 1997/10/16 23:55:18 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
* o Add commands for traffic summary, version display, etc.
|
||||
@ -166,7 +166,7 @@ Cleanup(int excode)
|
||||
{
|
||||
OsLinkdown();
|
||||
OsCloseLink(1);
|
||||
sleep(1);
|
||||
nointr_sleep(1);
|
||||
if (mode & MODE_AUTO)
|
||||
DeleteIfRoutes(1);
|
||||
(void) unlink(pid_filename);
|
||||
@ -708,7 +708,7 @@ DoLoop()
|
||||
} else if (mode & MODE_DEDICATED) {
|
||||
if (modem < 0)
|
||||
while (OpenModem(mode) < 0)
|
||||
sleep(VarReconnectTimer);
|
||||
nointr_sleep(VarReconnectTimer);
|
||||
}
|
||||
fflush(VarTerm);
|
||||
|
||||
@ -787,7 +787,7 @@ DoLoop()
|
||||
LogPrintf(LogCHAT, "Dial attempt %u\n", tries);
|
||||
|
||||
if ((res = DialModem()) == EX_DONE) {
|
||||
sleep(1); /* little pause to allow peer starts */
|
||||
nointr_sleep(1); /* little pause to allow peer starts */
|
||||
ModemTimeout();
|
||||
PacketMode();
|
||||
dial_up = FALSE;
|
||||
@ -848,7 +848,7 @@ DoLoop()
|
||||
* ppp process eats many CPU time.
|
||||
*/
|
||||
#ifndef SIGALRM
|
||||
usleep(TICKUNIT);
|
||||
nointr_usleep(TICKUNIT);
|
||||
TimerService();
|
||||
#else
|
||||
handle_signals();
|
||||
@ -931,7 +931,7 @@ DoLoop()
|
||||
}
|
||||
if (FD_ISSET(modem, &rfds)) { /* something to read from modem */
|
||||
if (LcpFsm.state <= ST_CLOSED)
|
||||
usleep(10000);
|
||||
nointr_usleep(10000);
|
||||
n = read(modem, rbuff, sizeof(rbuff));
|
||||
if ((mode & MODE_DIRECT) && n <= 0) {
|
||||
DownConnection();
|
||||
|
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: modem.c,v 1.57 1997/09/22 23:59:14 brian Exp $
|
||||
* $Id: modem.c,v 1.58 1997/09/23 22:07:51 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
*/
|
||||
@ -552,7 +552,7 @@ OpenModem(int mode)
|
||||
mbits = 0;
|
||||
dev_is_modem = isatty(modem) || DEV_IS_SYNC;
|
||||
if (DEV_IS_SYNC)
|
||||
sleep(1);
|
||||
nointr_sleep(1);
|
||||
if (dev_is_modem && !DEV_IS_SYNC) {
|
||||
tcgetattr(modem, &rstio);
|
||||
modemios = rstio;
|
||||
@ -685,7 +685,7 @@ HangupModem(int flag)
|
||||
}
|
||||
tcsetattr(modem, TCSANOW, &tio);
|
||||
#endif
|
||||
sleep(1);
|
||||
nointr_sleep(1);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: timer.c,v 1.19 1997/10/23 20:11:01 ache Exp $
|
||||
* $Id: timer.c,v 1.20 1997/10/23 21:32:48 ache Exp $
|
||||
*
|
||||
* TODO:
|
||||
*/
|
||||
@ -198,7 +198,7 @@ ShowTimers()
|
||||
|
||||
#ifdef SIGALRM
|
||||
u_int
|
||||
sleep(u_int sec)
|
||||
nointr_sleep(u_int sec)
|
||||
{
|
||||
struct timeval to, st, et;
|
||||
long sld, nwd, std;
|
||||
@ -229,7 +229,7 @@ sleep(u_int sec)
|
||||
}
|
||||
|
||||
void
|
||||
usleep(u_int usec)
|
||||
nointr_usleep(u_int usec)
|
||||
{
|
||||
struct timeval to, st, et;
|
||||
long sld, nwd, std;
|
||||
|
Loading…
x
Reference in New Issue
Block a user