IPC resource clean up
Hi,
I have to clean up the ipc resources allocated to specific programs in my program. The only information I have regarding any particular process is its process id. I am using kill(pid,SIGTERM); to kill the process. But this does not clean up the allocated ipc resources. Is there any other way? I cannot use shmctl etc... since i don't have access to msqid, semid and shmid of the resources allocated to the processes. Moreover, I do not want to clean up all the resources for all programs (for which i have a script). It has to be specific to a particular program, given its process id. Thanks. |
From a shell, you can use ipcrm if you are sufficiently privileged. Also, ipcs can be used to view the state of IPC entities. Programmatically, I think you can acquire the information provided by ipcs from the /proc/sysvipc filesystem, and from there, with sufficient privilege, you can use shmctl() and friends.
--- rod. |
All times are GMT -5. The time now is 08:09 PM. |