Re: What does kernel do when it receives the SIGKILL
- From: "Kaz Kylheku" <kkylheku@xxxxxxxxx>
- Date: 6 Sep 2006 22:35:44 -0700
Binary wrote:
Hi,
As I know, SIGKILL is performed by linux kernel that kill the app, what
I want to know is if the app is terminated, the opened file will be
closed by kernel?
If that were not the case, there would be a resource leak every time a
process was killed.
A file being open means that there is a file descriptor object in
memory which is associated with that file. To close a file essentially
means to discard that file descriptor object.
If a file is deleted while one or more descriptors reference it, it
continues to exist until the last close, even though no directory entry
references it. So if process termination failed to close files, not
only would it result in a resource leak in memory, it would also cause
resource leaks on disk, which would only be hunted down at the next
file system check (fsck).
.
- References:
- What does kernel do when it receives the SIGKILL
- From: Binary
- What does kernel do when it receives the SIGKILL
- Prev by Date: Re: Threads Vs Forks in Embedded Environment
- Next by Date: Threads vs Forks in embedded environment : Some Conclusions
- Previous by thread: Re: What does kernel do when it receives the SIGKILL
- Next by thread: Threads Vs Forks in Embedded Environment
- Index(es):
Relevant Pages
|
Loading