emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

trying to fork away from Emacs in a sub-process from elisp


From: Nic Ferrier
Subject: trying to fork away from Emacs in a sub-process from elisp
Date: Tue, 09 Aug 2005 21:57:52 +0100

I'm writing a tiny image viewer to be used in conjunction with emacs.

I've constructed the viewer so that it need only start once. It sets
up a named pipe so that all subsequent invocations talk to the initial
program over the named pipe (imagemagick is supposed to do this with
the -remote option, but it doesn't work).

I realize that I *could* implement the
when-is-the-process-the-first-process logic in elisp... but I thought
it was simpler and neater to have the client program simply daemonize
itself on the fifo setup invocation.

Trouble is, when the program daemonizes, Emacs doesn't seem to
recognize it and carries on waiting (waiting for what I'm not sure).

Is there some reason why client programs cannot daemonize when started
by emacs?



For reference, my client program is written in python and is following
this basic procedure:

  fork
    child:
      setsid
      fork
         child:
            chdir /
            close stdout
            close stdin
            close stderr



Nic Ferrier




reply via email to

[Prev in Thread] Current Thread [Next in Thread]