Delete all SYSTEM V shared memory and semaphores on UNIX-like systems

前端 未结 11 2424
情话喂你
情话喂你 2020-12-23 14:01

How can I delete all not used semaphores and shared memory with a single command on a UNIX-like system, e.g., Ubuntu?

11条回答
  •  醉梦人生
    2020-12-23 14:49

    Since you mentioned that you're working on a NFS system, do you have access to those semaphores and shared memory? I think you misunderstood what they are, they are an API code that enables processes to communicate with each other, semaphores are a solution for preventing race conditions and for threads to communicate with each other, in simple answer, they do not leave any residue on any filesystem.

    Unless you are using an socket or a pipe? Do you have the necessary permissions to remove them, why are they on an NFS system?

    Hope this helps, Best regards, Tom.

提交回复
热议问题