How does 'eject' get processes to close file handles?
2
votes
2
answers
395
views
On my Mac, when I 'eject' a network-mounted share, my Mac presents me with the following message, and attempts to get processes to close open file handles and cleanly dismount the share. My question is, how exactly does it accomplish that? I suppose it enumerates file handles open with my share's path, and then sends some kind of signal to the processes that own those file handles? Just a guess, please fill me in, I'm very curious about it.
I thought about asking this over on the Apple stack exchange, but I'm guessing this is actually a more generally-applicable UNIX question. If I'm wrong and macOS has a special/new way of doing this and this question needs to be closed and re-opened there, just let me know.
EDIT: added screenshot.

Asked by Harv
(2512 rep)
Dec 6, 2017, 05:51 AM
Last activity: Dec 6, 2017, 05:02 PM
Last activity: Dec 6, 2017, 05:02 PM