HP 3000 Manuals

sleep [ MPE/iX Developer's Kit Reference Manual Volume I ] MPE/iX 5.0 Documentation


MPE/iX Developer's Kit Reference Manual Volume I

sleep 

Delays process execution.

Syntax 

     #include <unistd.h>
     unsigned int sleep (unsigned int seconds);

Parameters 

seconds    Specifies the number of real time seconds to sleep.

Return Values 

No return  If the action associated with a signal is to terminate,
           sleep() does not return.

0          The requested time has elapsed.

>0         The difference between seconds and the actual number of
           seconds slept before delivery of a signal whose action is to
           execute a signal handling function.

Description 

The sleep() function suspends the calling process from execution either
for the number of real-time seconds specified by the seconds parameter or
until the delivery of a signal whose action is either to execute a
signal-handling function or to terminate the process.

If seconds real-time seconds have passed without receipt of a signal with
the appropriate action, sleep() returns control to the calling process.

If the action associated with a received signal is to execute a signal
handling function, upon completion of the function, sleep() returns
control to the calling process.  If the signal action is to terminate the
process, sleep() does not return.

Due to system activity, the process may be suspended for more than the
number of real-time seconds indicated by the seconds parameter.

Implementation Considerations 

The SIGALRM signal is not used to implement sleep().

Errors 

None.

See Also 

alarm(), pause(), sigaction(), POSIX.1 (Section 3.4.3).



MPE/iX 5.0 Documentation