IPCRM(1POSIX)

πŸ‘‘ IPCRM β€” the POSIX Programmer's Manual era πŸ’…

okay bestie, so this page lives in the POSIX Programmer's Manual (that's the manual name, it's giving official), and heads up before we even start: the Linux implementation of this interface may differ β€” so if you're on Linux, go check the corresponding Linux manual page for the real tea. or honestly? the interface might not even be implemented on Linux at all. πŸ™ˆ


✨ PROLOG ✨

This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the corresponding Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux.

no cap, read that twice. it's the fine print that saves you. 🫢

🌸 NAME 🌸

ipcrm β€” remove an XSI message queue, semaphore set, or shared memory segment identifier

like. it deletes your interprocess communication stuff. that's the whole job. iconic honestly.


⭐ SYNOPSIS ⭐

ipcrm [-q msgid|-Q msgkey|-s semid|-S semkey|-m shmid|-M shmkey]...

see those ... at the end? yeah, you can stack these. multiple things, one command, one slay. πŸ”₯


πŸ’– DESCRIPTION πŸ’–

The ipcrm utility shall remove zero or more message queues, semaphore sets, or shared memory segments. Which interprocess communication facilities get removed? that's decided entirely by the options you pass, bestie. you point, it deletes.

Only a user with appropriate privileges shall be allowed to remove an interprocess communication facility that was not created by or owned by the user invoking ipcrm.

translation: if it's not yours and you're not privileged, hands off. 🚫 no touching other people's stuff.

πŸŽ€ OPTIONS πŸŽ€

The ipcrm utility shall conform to the Base Definitions volume of POSIX.1‐2017, Section 12.2, Utility Syntax Guidelines. (yes, there's a whole guideline situation and it's following it. well behaved king. πŸ‘‘)

The following options shall be supported:

  • -q msgid β€” remove the message queue identifier msgid from the system, and destroy the message queue and the data structure associated with it. gone. bye. πŸ’€
  • -m shmid β€” remove the shared memory identifier shmid from the system. the shared memory segment and the data structure associated with it shall be destroyed after the last detach. so like, it's not instant-instant, it waits its turn.
  • -s semid β€” remove the semaphore identifier semid from the system and destroy the set of semaphores and the data structure associated with it. ✨
  • -Q msgkey β€” remove the message queue identifier created with key msgkey from the system, and destroy the message queue and the data structure associated with it. (yes, by key this time, not by id β€” very iykyk)
  • -M shmkey β€” remove the shared memory identifier created with key shmkey from the system. the shared memory segment and the data structure associated with it shall be destroyed after the last detach. same detach drama as -m.
  • -S semkey β€” remove the semaphore identifier created with key semkey from the system and destroy the set of semaphores and the data structure associated with it. πŸ’…

so real talk: lowercase = you're giving it an id. uppercase = you're giving it a key. that's the pattern, that's the vibe check, you're welcome. 🌈


πŸ¦‹ OPERANDS πŸ¦‹

None.

literally none. this one does not take operands. everything comes in through the options. periodt.


πŸ’œ STDIN πŸ’œ

Not used.

it is not reading from you. it is not listening. 😭


🌸 INPUT FILES 🌸

None.


🧚 ENVIRONMENT VARIABLES 🧚

The following environment variables shall affect the execution of ipcrm:

  • LANG β€” provide a default value for the internationalization variables that are unset or null. (see the Base Definitions volume of POSIX.1‐2017, Section 8.2, Internationalization Variables for the precedence of internationalization variables used to determine the values of locale categories.)
  • LC_ALL β€” if set to a non-empty string value, override the values of all the other internationalization variables. it's the main character, it overrides everybody. πŸ‘‘
  • LC_CTYPE β€” determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed to multi-byte characters in arguments).
  • LC_MESSAGES β€” determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error.
  • NLSPATH β€” determine the location of message catalogs for the processing of LC_MESSAGES.

⭐ ASYNCHRONOUS EVENTS ⭐

Default.

no special signal choreography here, just the default behavior. chill. 🫢


✨ STDOUT ✨

Not used.

not a single character goes out. it's silent, it's mysterious, it's doing its thing in the dark. πŸ’…


πŸ’– STDERR πŸ’–

The standard error shall be used only for diagnostic messages.

that's it. that's the only place it speaks. and only when something's up. 😭


πŸŽ€ OUTPUT FILES πŸŽ€

None.


🌈 EXTENDED DESCRIPTION 🌈

None.

no extra lore. the description was the description. we move. πŸ”₯


πŸ‘‘ EXIT STATUS πŸ‘‘

The following exit values shall be returned:

  1. 0 β€” Successful completion. ate. πŸ’…
  2. >0 β€” An error occurred. 😭

πŸ’€ CONSEQUENCES OF ERRORS πŸ’€

Default.

The following sections are informative.

ok so heads up: everything from here down is informative, meaning it's context and lore, not requirements. just so you know what you're reading, bestie.

πŸ¦‹ APPLICATION USAGE πŸ¦‹

None.


πŸ“ EXAMPLES πŸ“

None.

no examples on this one. shocking, I know. πŸ™ˆ


πŸ’œ RATIONALE πŸ’œ

None.


⭐ FUTURE DIRECTIONS ⭐

None.


🌸 SEE ALSO 🌸

  • ipcs
  • The Base Definitions volume of POSIX.1‐2017, Chapter 8, Environment Variables, Section 12.2, Utility Syntax Guidelines
  • The System Interfaces volume of POSIX.1‐2017, msgctl(), semctl(), shmctl()

like yeah, go read ipcs to see what's there, then come back here to remove it. and those three system interfaces? that's where the actual machinery lives. iykyk. ✨


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 .


ok that's the whole thing, bestie πŸ’– this page came to you from the IEEE/The Open Group, dated 2017, and its manual name is IPCRM(1POSIX) β€” go forth and clean up your IPC like the icon you are. πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from