Unix/Linux Go Back    

OpenSolaris 2009.06 - man page for alarm (opensolaris section 2)

Linux & Unix Commands - Search Man Pages
Man Page or Keyword Search:   man
Select Man Page Set:       apropos Keyword Search (sections above)

alarm(2)				   System Calls 				 alarm(2)

       alarm - schedule an alarm signal

       #include <unistd.h>

       unsigned int alarm(unsigned int seconds);

       The  alarm() function causes the system to generate a SIGALRM signal for the process after
       the  number  of	real-time  seconds  specified  by  seconds   have   elapsed  (see    sig-
       nal.h(3HEAD)).  Processor scheduling delays may prevent the process from handling the sig-
       nal 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  generated,  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 cre-
       ated by one of the exec(2) functions inherits the time left to an alarm signal in the  old
       process's image.

       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.

       The  alarm()  function  is  always  successful; no return value is reserved to indicate an

       See attributes(5) for descriptions of the following attributes:

       |      ATTRIBUTE TYPE	     |	    ATTRIBUTE VALUE	   |
       |Interface Stability	     |Standard			   |
       |MT-Level		     |Async-Signal-Safe 	   |

       exec(2), fork(2), signal.h(3HEAD), attributes(5), standards(5)

SunOS 5.11				    6 Jun 2007					 alarm(2)
Unix & Linux Commands & Man Pages : ©2000 - 2018 Unix and Linux Forums

All times are GMT -4. The time now is 08:53 AM.