From: j.neuschaefer@gmx.net (Jonathan Neuschäfer)
To: kernelnewbies@lists.kernelnewbies.org
Subject: executable ELF is rm-ed from disk, but still running RAM..
Date: Mon, 30 May 2011 18:26:33 +0200 [thread overview]
Message-ID: <20110530162633.GB5994@debian.debian> (raw)
In-Reply-To: <BANLkTin4m+-EOK-iGve_uquJT+VM4RRKfA@mail.gmail.com>
On Mon, May 30, 2011 at 09:49:29PM +0700, Mulyadi Santosa wrote:
> Hi all..
>
> As the subject says, I was thinking about that issue.
>
> I know that rm-ing a file doesn't delete the data block from the
> backing device, thus the executable could still survive and running.
>
> But logically, we usually expect that once a file is rm-ed, it should
> also "stop", right? What does POSIX say about this case anyway? Anyone
> could kindly give his/her opinion?
I think the point is that the file is still "open", i.e. mapped into the
the processes virtual memory, and thus the inode whose seemingly last
reference you've just removed is still referenced.
I'm guessing that from unlink(2): "If the name was the last link to a
file but any processes still have the file open the file will remain in
existence until the last file descriptor referring to it is closed." A
mapping is not a file desciptor but I believe that it behaves similiarly.
But I'm not sure.
Thanks,
Jonathan Neusch?fer
next prev parent reply other threads:[~2011-05-30 16:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-30 14:49 executable ELF is rm-ed from disk, but still running RAM Mulyadi Santosa
2011-05-30 16:26 ` Jonathan Neuschäfer [this message]
2011-05-31 1:25 ` Pei Lin
2011-05-31 2:46 ` Mulyadi Santosa
2011-05-31 2:57 ` Manish Katiyar
2011-05-31 3:45 ` Mulyadi Santosa
2011-05-31 4:42 ` Manish Katiyar
2011-05-31 4:56 ` Vikash Kumar
2011-05-31 6:53 ` Mulyadi Santosa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110530162633.GB5994@debian.debian \
--to=j.neuschaefer@gmx.net \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.