PAUSE(3)

πŸ“¦
version 15.1 Β· 2 versions
, in freebsd 15.1

okay so bestie, welcome to PAUSE(3) from the Library Functions Manual β€” yes, the manual name is folded right in because we're cute like that. This is the page for pause, and it's literally "stop until signal." πŸŽ€

🌸 NAME 🌸

pause β€” stop until signal. That's the whole name, no cap. ✨

🫢 LIBRARY 🫢

Standard C Library (libc, -lc). Slay. πŸ’…

✨ SYNOPSIS ✨

#include <unistd.h>

int
pause(void);

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so first thing: Pause is made obsolete by sigsuspend(2). Not me being dramatic, that's literally the man page. πŸ’€

The pause() function forces a process to pause until a signal is received from either the kill(2) function or an interval timer. (See setitimer(2).) πŸ•°οΈ

And upon termination of a signal handler started during a pause(), the pause() call will return. That's the whole loop, bestie. ✨

πŸ”₯ RETURN VALUES πŸ”₯

Always returns -1. That's not a maybe, that's a periodt. πŸ’€

😭 ERRORS 😭

The pause() function always returns:

  • [EINTR] β€” The call was interrupted.

🌈 SEE ALSO 🌈

πŸ‘‘ HISTORY πŸ‘‘

A pause() system call first appeared in the Programmer's Workbench (PWB/UNIX) and was then ported to Version 7 AT&T UNIX. It was reimplemented as a wrapper around the sigpause() and sigblock() system calls in 4.2BSD, and around the sigsuspend(2) and sigprocmask(2) system calls in 4.3BSD-Reno. History really said "reinvent me" multiple times. πŸ’…


xoxo, Debian πŸ’– β€” page date April 3, 2022, and the title is still PAUSE(3). Byeee 🫢

πŸ“¦ where this page comes from
  • freebsd 15.1: base 15.1
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms