
22 Nov
2004
22 Nov
'04
2 p.m.
Glynn Clements wrote:
"C exit routines" aren't responsible for freeing OS resources; the OS is.
The fact that the SysV IPC objects aren't freed on exit is intentional; they are meant to be persistent. For the same reason, the OS doesn't delete upon termination any files which the process created.
Right, which is why if you want to clean up temporary files, or temporary semaphores the OS doesn't do it for you, and you need to put some routine inplace to do it (using at_exit)... It seems this is the only way to guarantee something gets run when a program exits for whatever reason. Keean.