kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: mulyadi.santosa@gmail.com (Mulyadi Santosa)
To: kernelnewbies@lists.kernelnewbies.org
Subject: executable ELF is rm-ed from disk, but still running RAM..
Date: Tue, 31 May 2011 09:46:40 +0700	[thread overview]
Message-ID: <BANLkTimUcLExz5oVcSkUxqRRRW9KN7bMBA@mail.gmail.com> (raw)
In-Reply-To: <BANLkTi=Ro7h8p1D7C7Y=F8QzRV+4jAaEog@mail.gmail.com>

Hi all..


On Tue, May 31, 2011 at 08:25, Pei Lin <telent997@gmail.com> wrote:
> 2011/5/30 Mulyadi Santosa <mulyadi.santosa@gmail.com>:
>> 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?
> In my view, i don't expect that rm one file should also stop the
> related process. If that, in one system, do the thing "rm sysfile"
> will stop OS running? In my logic, i just think run the executable is
> the user's choice before "rm it", if the user want to delete file,
> also who want to stop the process related this file should kill the
> process themselves. I consider that if the users delete one file
> uncarefully, should give the chance to recover it and not block
> current running task.


Thanks for sharing your thoughts so far. This came to my mind when I
did a project about 2 years ago. At that time, I also came to very
much same conclusion: if you want to make sure new binary is executed,
sigkill/sigterm the old ones first, remove them and run the new one.
Seems trivial, but initially this tiny little detail missed from my
mind.


-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

  reply	other threads:[~2011-05-31  2:46 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
2011-05-31  1:25 ` Pei Lin
2011-05-31  2:46   ` Mulyadi Santosa [this message]
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=BANLkTimUcLExz5oVcSkUxqRRRW9KN7bMBA@mail.gmail.com \
    --to=mulyadi.santosa@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).