Unix and Linux Discussions Tagged with need help |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
9 |
10,668 |
Shell Programming and Scripting |
|
|
|
2 |
13,373 |
Homework & Coursework Questions |
|
|
|
5 |
2,918 |
Shell Programming and Scripting |
|
|
|
0 |
2,983 |
Programming |
|
|
|
5 |
1,248 |
Shell Programming and Scripting |
|
|
|
6 |
2,753 |
Solaris |
|
|
|
18 |
15,052 |
Shell Programming and Scripting |
|
|
|
4 |
1,219 |
Shell Programming and Scripting |
|
|
|
11 |
11,704 |
Homework & Coursework Questions |
|
|
|
2 |
679 |
UNIX for Beginners Questions & Answers |
|
|
|
1 |
4,407 |
Shell Programming and Scripting |
|
|
|
1 |
918 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
2,155 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
2,008 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
1,726 |
UNIX for Advanced & Expert Users |
|
|
|
3 |
1,672 |
Shell Programming and Scripting |
|
|
|
4 |
1,575 |
Shell Programming and Scripting |
|
|
|
4 |
1,962 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
1,442 |
Shell Programming and Scripting |
|
|
|
2 |
1,409 |
Shell Programming and Scripting |
|
|
|
6 |
7,653 |
Shell Programming and Scripting |
|
|
|
1 |
1,341 |
Shell Programming and Scripting |
|
|
|
2 |
1,721 |
Shell Programming and Scripting |
|
|
|
4 |
1,719 |
Shell Programming and Scripting |
|
|
|
0 |
2,722 |
UNIX for Dummies Questions & Answers |
|
|
|
0 |
1,428 |
Shell Programming and Scripting |
|
|
|
4 |
1,551 |
Shell Programming and Scripting |
|
|
|
2 |
1,834 |
Shell Programming and Scripting |
|
|
|
1 |
1,466 |
Shell Programming and Scripting |
|
|
|
7 |
3,366 |
Shell Programming and Scripting |
|
|
|
2 |
3,495 |
UNIX for Advanced & Expert Users |
|
|
|
6 |
1,789 |
Shell Programming and Scripting |
|
|
|
4 |
2,708 |
UNIX for Dummies Questions & Answers |
|
|
|
6 |
2,478 |
Shell Programming and Scripting |
|
|
|
2 |
2,048 |
Shell Programming and Scripting |
|
|
|
3 |
2,152 |
Shell Programming and Scripting |
|
|
|
16 |
5,387 |
Shell Programming and Scripting |
|
|
|
1 |
3,409 |
Programming |
|
|
|
2 |
1,612 |
Shell Programming and Scripting |
|
|
|
14 |
4,833 |
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 sec);
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.
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 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.10 7 Jun 2001 alarm(2)