RAISE(3P)

🌸 RAISE(3P) β€” the POSIX Programmer's Manual, bestie edition 🌸

okay so. this is raise(3P), and it lives in the POSIX Programmer's Manual. hi. welcome. πŸ’–


✨ PROLOG ✨

so like, real talk first: this manual page is part of the POSIX Programmer's Manual. the Linux implementation of this interface may differ β€” like, actually differ β€” so if you're on Linux you gotta go consult the corresponding Linux manual page for details of Linux behavior. or honestly? the interface might just not be implemented on Linux at all. πŸ™ˆ so check, bestie. always check.


πŸ’… NAME πŸ’…

raise β€” send a signal to the executing process. that's it. that's the whole vibe. she raises. she signals. πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

#include <signal.h>

int raise(int sig);

that's the whole thing. two lines. iconic. πŸ¦‹


🌈 DESCRIPTION 🌈

so the functionality described on this reference page is aligned with the ISO C standard. and if there's any conflict between the requirements described here and the ISO C standard? that's unintentional, fr fr. this volume of POSIX.1‐2017 defers to the ISO C standard. no drama, no beef, ISO C wins. periodt.

the raise() function shall send the signal sig to the executing thread or process. yep β€” thread or process, she's flexible like that.

and here's the part that lowkey matters: if a signal handler is called, the raise() function shall not return until after the signal handler does. like, she's waiting for you to finish your little monologue. she's not leaving early. she's a good friend. 🫢

the effect of the raise() function shall be equivalent to calling:

pthread_kill(pthread_self(), sig);

same energy. literally equivalent. no cap. ✨


⭐ RETURN VALUE ⭐

upon successful completion, 0 shall be returned. yay! πŸŽ‰

otherwise, a non-zero value shall be returned, and errno shall be set to indicate the error. so like, if it's not 0, go read errno. she's telling you what went wrong. listen to her. πŸ‘€


πŸ’€ ERRORS πŸ’€

the raise() function shall fail if:

  • EINVAL β€” the value of the sig argument is an invalid signal number. yeah. that's not a signal, bestie. that's a typo. 😭
also heads up: the following sections are informative. like, they're not requirements, they're just... vibes and context.

πŸ“ EXAMPLES πŸ“

None.

nothing. empty. a blank canvas. we love a minimalist. 🎨


🧚 APPLICATION USAGE 🧚

None.

also nothing. the void stares back. πŸ’œ


πŸ‘‘ RATIONALE πŸ‘‘

the term ``thread'' is an extension to the ISO C standard. that's it. that's the whole rationale. she said "thread" and ISO C was like "um, excuse me?" and POSIX was like "it's an extension, babe." πŸ’…


πŸ”₯ FUTURE DIRECTIONS πŸ”₯

None.

no plans. no roadmap. she's not going anywhere. she's already perfect. ⭐


🌸 SEE ALSO 🌸

  • kill()
  • sigaction()

and also, from the Base Definitions volume of POSIX.1‐2017:

  • <signal.h>
  • <sys_types.h>

go read those too. homework. you'll thank me. πŸŽ€


okay legal moment, everyone sit up straight:

portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group.

in the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. the original Standard can be obtained online at http://www.opengroup.org/unix/online.html .

any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. to report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .


and that's the whole page!! πŸ’– this one came to you courtesy of IEEE/The Open Group, 2017 β€” yeah, 2017, she's vintage, she's timeless, she's a classic. mwah. 🫢✨

πŸ“¦ where this page comes from