public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Padraig Brady <padraig@antefacto.com>
To: ebuddington@wesleyan.edu
Cc: linux-kernel@vger.kernel.org
Subject: Re: Dissociating process from bin's filesystem
Date: Thu, 25 Apr 2002 12:42:59 +0100	[thread overview]
Message-ID: <3CC7EBC3.6030707@antefacto.com> (raw)
In-Reply-To: <20020424224714.B19073@ma-northadams1b-46.bur.adelphia.net>

I'm think this is not possible at the moment.

The file of the executing process is in use as the backing store for
one or more live virtual memory areas, so changing it could
corrupt the processes using those areas. Hence you can't umount.

Now the Mach kernel has a MAP_COPY flag to the mmap system call
which would do what you want, but this is mucho complex/messy,
so don't hold your breath for a linux implementation.

A related note on shared libraries is you don't get the
"text file busy" message if you  update them while they're in use,
like you do for executable files. The reason is MAP_DENYWRITE
is ignored for security reasons. I think Eric Biederman has
a workaround though?

So in summary if you want a process to run independently of
a filesystem, make it static and run it from a ramdisk.

Padraig.

Eric Buddington wrote:
> Is there any way to dissociate a process from its on-disk binary?  In
> other words, I want to start 'foo_daemon', then unmount the filesystem
> it started from. It seems to me this would be reasonably accomplished
> by loading the binary completely into memory first ro eliminate the
> dependence.
> 
> Is this possible, or planned? Are there intractable problems with it
> that I don't see?
> 
> Eric Buddington


  parent reply	other threads:[~2002-04-25 11:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-25  2:47 Dissociating process from bin's filesystem Eric Buddington
2002-04-25  3:42 ` James Cassidy
2002-04-25  8:52 ` john slee
2002-04-25  9:22   ` johan.adolfsson
2002-04-25 11:42 ` Padraig Brady [this message]
2002-04-27 19:03   ` Eric W. Biederman
2002-04-25 12:28 ` Rob Landley
2002-04-25 17:52   ` Chris Friesen

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=3CC7EBC3.6030707@antefacto.com \
    --to=padraig@antefacto.com \
    --cc=ebuddington@wesleyan.edu \
    --cc=linux-kernel@vger.kernel.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