pause(2)
โจ pause(2) โจ
okay bestie, welcome to pause(2) from the System Calls Manual โ literally the chillest syscall in the whole libc friend group ๐
๐ธ NAME ๐ธ
pause โ wait for signal ๐ฆ
๐ LIBRARY ๐
Standard C library (libc, -lc) ๐
๐ช SYNOPSIS ๐ช
#include <unistd.h>
int pause(void);
๐ DESCRIPTION ๐
so the way that pause() works is iconic in its simplicity: it makes the calling process (or thread โ yes, threads count too, periodt) go full sleepy-girl mode ๐ด and just... sleep. It stays asleep until a signal shows up that either:
- terminates the process, or
- causes the invocation of a signal-catching function ๐ฅ
that's it. that's the whole vibe. no cap.
๐ซถ RETURN VALUE ๐ซถ
okay so here's the thing โ pause() lowkey never returns normally. It only comes back when a signal was caught and the signal-catching function returned. In that case:
pause()returns-1๐ญ- and
errnois set toEINTR
so it's giving "I woke up and I'm a little confused about it" energy fr fr.
๐ ERRORS ๐
EINTRโ a signal was caught and the signal-catching function returned. that's the one and only babe, no other options, no cap (the docs literally list just this one, so don't go looking for more ๐).
๐ STANDARDS ๐
POSIX.1-2024. she's certified, she's compliant, she ate โจ
๐ HISTORY ๐
POSIX.1-2001, SVr4, 4.3BSD โ so she's been around since forever, a true vintage queen ๐
๐ฅ SEE ALSO ๐ฅ
reminder bestie: if you're out here callingpause()and expecting it to return0, that's not happening. It returns-1witherrno == EINTRor it doesn't return at all. Set yourerrnoexpectations accordingly ๐
kisses, this was pause(2) from Linux man-pages 6.20, dated 2026-02-08 ๐ bye bestie, go read sigsuspend(2) next, it's the extroverted version of this one ๐
๐ฆ where this page comes from
- arch rolling: man-pages 6.20-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- ๐ the page's license: Linux-man-pages-copyleft
- Copyright 1992, Drew Eckhardt <drew@cs.colorado.edu>
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms