Re: Q: Daemons, how to kill & restart remotely

Jens.Toerring_at_physik.fu-berlin.de
Date: 09/19/04

  • Next message: Dave Platt: "Re: Q: Daemons, how to kill & restart remotely"
    Date: 19 Sep 2004 17:37:33 GMT
    
    

    James Lehman <james[remove]@akrobiz.com> wrote:
    > Let's say I have a daemon process that provides a TCP/IP service.
    > I can use this service to do many things on the remote machine,
    > including uploading a new set of freshly built executables
    > that make a whole working solution.

    > How do I upload a new build of the daemon process itself?
    > Currently, I use the daemon, we'll call it xxxd, to upload a
    > file called xxxd_. then I shell into the system, killall xxxd
    > and cp xxxd_ over xxxd and restart the daemon.
    > Is there a neat way to cause xxxd to kill itself, perform
    > the copy and start again?

    Just have your daemon write the new version over the old one, then
    have it do an exec() to replace itself by the new version. I just
    hope you're doing that in a really secure way...

                                        Regards, Jens

    -- 
      \   Jens Thoms Toerring  ___  Jens.Toerring@physik.fu-berlin.de
       \__________________________  http://www.toerring.de
    

  • Next message: Dave Platt: "Re: Q: Daemons, how to kill & restart remotely"

    Relevant Pages

    • Re: Q: Daemons, how to kill & restart remotely
      ... > file called xxxd_. ... > and cp xxxd_ over xxxd and restart the daemon. ... # you then upload the new version or rename it ...
      (comp.os.linux.development.system)
    • Re: Daemons, how to kill & restart remotely
      ... xxxd_ over xxxd and starts xxxd. ... > Let's say I have a daemon process that provides a TCP/IP service. ... > How do I upload a new build of the daemon process itself? ...
      (comp.os.linux.development.system)