Provided by: manpages-ja-dev_0.5.0.0.20221215+dfsg-1_all 

名前
sleep - 指定の秒数の間だけ休止する
書式
#include <unistd.h>
unsigned int sleep(unsigned int seconds);
説明
sleep() causes the calling thread to sleep either until the number of real-time seconds specified in
seconds have elapsed or until a signal arrives which is not ignored.
返り値
要求された時間が過ぎた場合はゼロを返す。 呼び出しがシグナルハンドラーに割り込まれた場合は、 休止の残り時
間を返す。
属性
この節で使用されている用語の説明については、 attributes(7) を参照。
┌──────────────────┬───────────────┬─────────────────────────────┐
│ インターフェース │ 属性 │ 値 │
├──────────────────┼───────────────┼─────────────────────────────┤
│ sleep() │ Thread safety │ MT-Unsafe sig:SIGCHLD/linux │
└──────────────────┴───────────────┴─────────────────────────────┘
準拠
POSIX.1-2001, POSIX.1-2008.
注意
On Linux, sleep() is implemented via nanosleep(2). See the nanosleep(2) man page for a discussion of
the clock used.
Portability notes
On some systems, sleep() may be implemented using alarm(2) and SIGALRM (POSIX.1 permits this); mixing
calls to alarm(2) and sleep() is a bad idea.
休止中にシグナルハンドラーから longjmp(3) を使用することや SIGALRM のハンドリングを変更することは、定義
されていない結果を生む。
関連項目
sleep(1), alarm(2), nanosleep(2), signal(2), signal(7)
この文書について
この man ページは Linux man-pages プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告
に関する情報は https://www.kernel.org/doc/man-pages/ に書かれている。
GNU 2017-09-15 SLEEP(3)