Unix and Linux Discussions Tagged with need help |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
9 |
8,662 |
Shell Programming and Scripting |
|
|
|
2 |
12,622 |
Homework & Coursework Questions |
|
|
|
5 |
2,278 |
Shell Programming and Scripting |
|
|
|
0 |
2,724 |
Programming |
|
|
|
5 |
1,097 |
Shell Programming and Scripting |
|
|
|
6 |
2,457 |
Solaris |
|
|
|
18 |
14,140 |
Shell Programming and Scripting |
|
|
|
4 |
1,050 |
Shell Programming and Scripting |
|
|
|
11 |
10,545 |
Homework & Coursework Questions |
|
|
|
2 |
596 |
UNIX for Beginners Questions & Answers |
|
|
|
1 |
4,149 |
Shell Programming and Scripting |
|
|
|
1 |
854 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
2,058 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
1,878 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
1,661 |
UNIX for Advanced & Expert Users |
|
|
|
3 |
1,610 |
Shell Programming and Scripting |
|
|
|
4 |
1,525 |
Shell Programming and Scripting |
|
|
|
4 |
1,897 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
1,400 |
Shell Programming and Scripting |
|
|
|
2 |
1,357 |
Shell Programming and Scripting |
|
|
|
6 |
7,481 |
Shell Programming and Scripting |
|
|
|
1 |
1,293 |
Shell Programming and Scripting |
|
|
|
2 |
1,673 |
Shell Programming and Scripting |
|
|
|
4 |
1,656 |
Shell Programming and Scripting |
|
|
|
0 |
2,602 |
UNIX for Dummies Questions & Answers |
|
|
|
0 |
1,377 |
Shell Programming and Scripting |
|
|
|
4 |
1,488 |
Shell Programming and Scripting |
|
|
|
2 |
1,780 |
Shell Programming and Scripting |
|
|
|
1 |
1,410 |
Shell Programming and Scripting |
|
|
|
7 |
3,296 |
Shell Programming and Scripting |
|
|
|
2 |
3,439 |
UNIX for Advanced & Expert Users |
|
|
|
6 |
1,728 |
Shell Programming and Scripting |
|
|
|
4 |
2,530 |
UNIX for Dummies Questions & Answers |
|
|
|
6 |
2,394 |
Shell Programming and Scripting |
|
|
|
2 |
2,001 |
Shell Programming and Scripting |
|
|
|
3 |
2,076 |
Shell Programming and Scripting |
|
|
|
16 |
5,063 |
Shell Programming and Scripting |
|
|
|
1 |
3,169 |
Programming |
|
|
|
2 |
1,549 |
Shell Programming and Scripting |
|
|
|
14 |
4,688 |
UNIX for Dummies Questions & Answers |
alarm(2) System Calls alarm(2)
NAME
alarm - schedule an alarm signal
SYNOPSIS
#include <unistd.h>
unsigned int alarm(unsigned int seconds);
DESCRIPTION
The alarm() function causes the system to generate a SIGALRM signal for the process after the number of real-time seconds specified by sec-
onds have elapsed (see signal.h(3HEAD)). Processor scheduling delays may prevent the process from handling the signal as soon as it is
generated.
If seconds is 0, a pending alarm request, if any, is cancelled. If seconds is greater than LONG_MAX/hz, seconds is rounded down to
LONG_MAX/hz. The value of hz is normally 100.
Alarm requests are not stacked; only one SIGALRM generation can be scheduled in this manner; if the SIGALRM signal has not yet been gen-
erated, the call will result in rescheduling the time at which the SIGALRM signal will be generated.
The fork(2) function clears pending alarms in the child process. A new process image created by one of the exec(2) functions inherits the
time left to an alarm signal in the old process's image.
RETURN VALUES
If there is a previous alarm request with time remaining, alarm() returns a non-zero value that is the number of seconds until the
previous request would have generated a SIGALRM signal. Otherwise, alarm() returns 0.
ERRORS
The alarm() function is always successful; no return value is reserved to indicate an error.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |Async-Signal-Safe |
+-----------------------------+-----------------------------+
SEE ALSO
exec(2), fork(2), signal.h(3HEAD), attributes(5), standards(5)
SunOS 5.11 6 Jun 2007 alarm(2)