diff options
author | Joerg Wunsch <joerg@FreeBSD.org> | 1997-06-23 10:00:01 +0000 |
---|---|---|
committer | Joerg Wunsch <joerg@FreeBSD.org> | 1997-06-23 10:00:01 +0000 |
commit | 334a95086d3c50c13e765e0f0eea728422600b2c (patch) | |
tree | ef792918299177e52ce71e7a6aa0517faebeab7c /usr.sbin | |
parent | 879210125e7d4a172e9c190d0d6e267c425ca0e9 (diff) | |
download | src-334a95086d3c50c13e765e0f0eea728422600b2c.tar.gz src-334a95086d3c50c13e765e0f0eea728422600b2c.zip |
Notes
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/lpr/common_source/displayq.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/usr.sbin/lpr/common_source/displayq.c b/usr.sbin/lpr/common_source/displayq.c index a974d6fea306..a5b8b26c5b91 100644 --- a/usr.sbin/lpr/common_source/displayq.c +++ b/usr.sbin/lpr/common_source/displayq.c @@ -73,6 +73,8 @@ static long totsize; /* total print job size in bytes */ static char *head0 = "Rank Owner Job Files"; static char *head1 = "Total Size\n"; +static void alarmhandler __P((int)); + /* * Display the current state of the queue. Format = 1 if long format. */ @@ -86,6 +88,7 @@ displayq(format) struct queue **queue; struct stat statb; FILE *fp; + void (*savealrm)(int); lflag = format; totsize = 0; @@ -212,7 +215,10 @@ displayq(format) (void) strcpy(cp, user[i]); } strcat(line, "\n"); + savealrm = signal(SIGALRM, alarmhandler); + alarm(10); fd = getport(RM, 0); + (void)signal(SIGALRM, savealrm); if (fd < 0) { if (from != host) printf("%s: ", host); @@ -446,3 +452,10 @@ prank(n) col += strlen(rline); printf("%s", rline); } + +void +alarmhandler(signo) + int signo; +{ + /* ignored */ +} |