Open Menu
Close Menu
Apple
Shopping Bag
Apple
Mac
iPad
iPhone
Watch
TV
Music
Support
Search apple.com
Shopping Bag
Lists
Open Menu
Close Menu
Terms and Conditions
Lists hosted on this site
Email the Postmaster
Tips for posting to public mailing lists
Re: Can't End A Process
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
]
Re: Can't End A Process
Subject
:
Re: Can't End A Process
From: Erik Buck <
email@hidden
>
Date: Mon, 15 Aug 2005 12:05:48 -0400
I have encountered unkillable processes on several flavors of Unix. When a Unix process dies, all file descriptors and heap memory are automatically released. [Beware of POSIX processor sets, message queues, shared memory, semaphores, and other resources that are not released automatically when a process dies or is killed.] On many Unix systems, any data buffered for a file descriptor is flushed when the file descriptor is closed/released. This includes file descriptors held open by mmap() and friends. This policy avoids inadvertent data loss.
The most common situation I see with unkillable processes is that some pending network IO such as a flush over NFS remains uncompleted and the process refuses to truly die until it completes. This is particularly problematic if the network connection used by NFS is down.
In the past, I have mitigated this problem by using unbuffered IO when possible even though that greatly degrades IO throughput. You can try explicitly closing all open file descriptors when the process receives a signal, but in my experience that just moves the same problem to a different location. Closing still hangs nearly forever, but at least it hangs from your code instead of somewhere deep in crt0 or the kernel.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
Prev by Date:
Re: Can't End A Process
Next by Date:
Re: NSButtonCell columns in NSOutlineView
Previous by thread:
Re: Can't End A Process
Next by thread:
-[NSSelectionBinder _didPresentModalAlert:contextInfo:]: selector not recognized
Index(es):
Date
Thread