1: #include <signal.h>
2:
3: static ringring;
4:
5: sleep(n)
6: unsigned n;
7: {
8: int sleepx();
9: unsigned altime;
10: int (*alsig)() = SIG_DFL;
11:
12: if (n==0)
13: return;
14: altime = alarm(1000); /* time to maneuver */
15: if (altime) {
16: if (altime > n)
17: altime -= n;
18: else {
19: n = altime;
20: altime = 1;
21: }
22: }
23: alsig = signal(SIGALRM, sleepx);
24: alarm(n);
25: for(;;) {
26: pause();
27: if (ringring) {
28: signal(SIGALRM, alsig);
29: alarm(altime);
30: ringring = 0;
31: return;
32: }
33: }
34: /*NOTREACHED*/
35: }
36:
37: static
38: sleepx()
39: {
40: ringring = 1;
41: }
Defined functions
sleep
defined in line
5; used 180 times
- in /usr/include/sys/inline.h line
12
- in /usr/src/cmd/cron.c line
129
- in /usr/src/cmd/cu.3451A.c line
435,
495,
1192
- in /usr/src/cmd/cu.c line
372
- in /usr/src/cmd/getty.c line
286,
463,
472
- in /usr/src/cmd/init.c line
427
- in /usr/src/cmd/iostat.c line
255
- in /usr/src/cmd/learn/makpipe.c line
18
- in /usr/src/cmd/login.c line
115,
213
- in /usr/src/cmd/remind/deliver.c line
44
- in /usr/src/cmd/remind/delrem.c line
319
- in /usr/src/cmd/remind/enqueue.c line
95
- in /usr/src/cmd/remind/main.c line
56
- in /usr/src/cmd/remind/misc.c line
30,
36,
51,
143
- in /usr/src/cmd/rm.c line
158
- in /usr/src/cmd/shutdown.c line
211,
219
- in /usr/src/cmd/sleep.c line
20
- in /usr/src/cmd/tail.c line
212
- in /usr/src/cmd/troff/n2.c line
182
- in /usr/src/cmd/uucp/4.2/condevs.c line
414,
427,
583,
601,
654,
730,
737,
750,
804,
894-901(3),
910,
1037-1044(3),
1053,
1110,
1222,
1281,
1300,
1339,
1419
- in /usr/src/cmd/uucp/4.2/conn.c line
304,
525,
571,
670
- in /usr/src/cmd/uucp/DIALUP/condevs.c line
415,
428,
584,
602,
655,
731,
738,
751,
805,
895-902(3),
911,
1038-1045(3),
1054,
1111,
1223,
1338,
1382,
1465,
1566
- in /usr/src/cmd/uucp/DIALUP/conn.c line
307,
528,
574,
673
- in /usr/src/cmd/uucp/DIALUP/line.c line
99
- in /usr/src/cmd/uucp/cico.c line
301,
453
- in /usr/src/cmd/uucp/condevs.c line
415,
428,
584,
602,
655,
731,
738,
751,
805,
895-902(3),
911,
1038-1045(3),
1054,
1111,
1223,
1320,
1342,
1422
- in /usr/src/cmd/uucp/conn.c line
307,
528,
574,
673
- in /usr/src/cmd/uucp/gename.c line
56
- in /usr/src/cmd/uucp/gnxseq.c line
34
- in /usr/src/cmd/uucp/line.c line
99
- in /usr/src/cmd/uucp/pk1.c line
375
- in /usr/src/cmd/uucp/xqt.c line
87
- in /usr/src/games/fortune/fortune.c line
80
- in /usr/src/lib/ape/util.c line
38
- in /usr/src/lib/c/gen/execvp.c line
53
- in /usr/src/lib/libF77/sleep_.c line
5
- in /usr/src/lib/libU77/sleep_.c line
17
- in /usr/src/lib/mp/util.c line
35
- in /usr/src/lib/plot/t4014/erase.c line
17
- in /usr/src/local/sroff/s2.c line
128
- in /usr/src/ucb/Mail/aux.c line
487
- in /usr/src/ucb/Mail/lock.c line
57
- in /usr/src/ucb/berknet/mach.c line
449
- in /usr/src/ucb/berknet/netdaemon.c line
394,
415,
421-426(2),
571
- in /usr/src/ucb/berknet/netlpr.c line
106
- in /usr/src/ucb/berknet/netstart.c line
11,
22,
32-37(2)
- in /usr/src/ucb/berknet/nettest.c line
34
- in /usr/src/ucb/berknet/sub.c line
143
- in /usr/src/ucb/berknet/v6mail.c line
394,
681
- in /usr/src/ucb/chfn.c line
99
- in /usr/src/ucb/clock.c line
23,
33
- in /usr/src/ucb/csh/sh.proc.c line
1055
- in /usr/src/ucb/delivermail/v6-mail.c line
467
- in /usr/src/ucb/delivermail/vax-mail.c line
749,
755
- in /usr/src/ucb/dump/src/dumptape.c line
96,
104,
218
- in /usr/src/ucb/error/errormain.c line
207
- in /usr/src/ucb/ex/ex2/ex_vops3.c line
368
- in /usr/src/ucb/ex/ex3/ex_vops3.c line
369
- in /usr/src/ucb/leave.c line
152
- in /usr/src/ucb/lpr/src/lpd.c line
127,
178,
472
- in /usr/src/ucb/lpr/src/lpq.c line
124
- in /usr/src/ucb/lpr/src/lprm.c line
182
- in /usr/src/ucb/more.c line
1275
- in /usr/src/ucb/sendmail/aux/4.1a_daemon.c line
90,
123,
188,
204,
234
- in /usr/src/ucb/sendmail/aux/bbn_daemon.c line
92,
114,
147
- in /usr/src/ucb/sendmail/aux/syslog.c line
273,
609,
993
- in /usr/src/ucb/sysline.c line
363-368(2),
382,
732
- in /usr/src/ucb/tset/tset.c line
1130
- in /usr/src/ucb/vmstat.c line
251
- in /usr/src/ucb/vsh/make.c line
27
- in /usr/src/ucb/vsh/xeq.c line
132