3 ms·
I came here to say more or less the same thing - my understanding was that system resources (like memory allocations, file descriptors) would be freed when the
by hamandcheese 6y ago
I came here to say more or less the same thing - my understanding was that system resources (like memory allocations, file descriptors) would be freed when the process exits.
That said, I still see the value of doing graceful shutdowns.
- pjmlp 6y agoNot necessarily, for example IPC connection points depending on what kind they are.
- twic 6y agoAh yes, the various highly cursed SysV IPC constructs. And named pipes. Any others? A communication channel which survives a process exit is fine as long as the next process start can pick it up again. You can do that with the SysV things and named pipes. Of course, you can also not do that - i remember the first program i wrote to play with SysV message queues created a fresh private queue each time, and didn't delete it on exit, so i ended up with piles of anonymous queues i couldn't delete. I had to go and cry to a system administrator who knew how to get rid of them.