Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ alarm(2) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

exec: execl, execv, execle, execve, execlp, execvp

getitimer, setitimer

pause

sigaction, sigvec, signal



ALARM(2,L)                  AIX Technical Reference                  ALARM(2,L)



-------------------------------------------------------------------------------
alarm



PURPOSE

Sets a process's alarm clock.

SYNTAX

unsigned int alarm (secs)
unsigned int secs;

DESCRIPTION

The alarm subroutine sets a timer which causes a SIGALRM signal to be delivered
to the calling process after the number of real-time seconds specified by the
secs parameter have elapsed. After the SIGALRM signal is delivered the timer is
turned off.

Unless caught, blocked, or ignored the SIGALRM signal will cause the process to
terminate.  (See "sigaction, sigvec, signal" for more information about
signals.)

Alarm requests are not stacked; successive calls reset the alarm timer.  If the
secs parameter is 0 the alarm timer is turned off, cancelling any pending alarm
request.

Because of process scheduling delays, the actual time lapse between setting the
timer and getting the SIGALRM signal may be more than requested.

The alarm timer value is inherited through the exec system call. The child
process after a fork system call will have its alarm timer turned off.

If the Transparent Computing Facility is installed, the alarm timer is
preserved through migrate and rexec system calls and during migrates caused by
SIGMIGRATE.

The alarm subroutine is a simplified interface to the setitimer system call.
See "getitimer, setitimer" for more information.

RETURN VALUE

The alarm subroutine returns the number of seconds previously remaining on the
alarm timer, or 0 if the timer was not running. (Note that because timer values
are inherited through exec, the timer may already be running when a program
begins to execute.)

RELATED INFORMATION





Processed November 7, 1990        ALARM(2,L)                                  1





ALARM(3,L)                  AIX Technical Reference                  ALARM(3,L)



In this book:  "exec:  execl, execv, execle, execve, execlp, execvp,"
"getitimer, setitimer," "pause," and "sigaction, sigvec, signal" .





















































Processed November 7, 1990        ALARM(3,L)                                  2



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026