2 ms·
You're over-complicating it. The cleanup I was describing is freeing resources that had been allocated to the process before the error. Sure, in a sufficientl
by dllthomas 6y ago
You're over-complicating it. The cleanup I was describing is freeing resources that had been allocated to the process before the error.
Sure, in a sufficiently crazy situation, close() might not actually close the file descriptor - maybe I've somehow trampled on the memory associated with the function (having worked around any kind of W^X), or maybe the operating system is just seriously fucked - but it seems crazy to expect that on the basis of failing to open a file. You should still close the socket.