Hi Eric, On Fri, Oct 04, 2013 at 12:27:17AM -0400, Eric Huang wrote: > I am trying to write an upstart script that will start and gracefully > shutdown emacs with my system. However, initctl stop emacs does not work.
> Basically, when I run initctl stop emacs: > dmesg only shows > [ 4363.589893] init: emacs goal changed from stop to start > on ctrl-c of initctl stop emacs, ps aux | grep emacs shows > eric 13008 14.5 0.0 291228 29200 ? Ssl 23:46 0:01 /usr/bin/emacs > --daemon -u eric > indicating that it never killed the daemon What does 'status emacs' show from the commandline? I believe you will find that, because emacs has daemonized (meaning the foreground process has exited), upstart assumes that the service has exited, and the running emacs process is not being tracked. Fixing this should be as simple as adding 'expect fork' to your upstart job, to let upstart know to expect emacs to detach from the foreground. Hope that helps, -- Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. Ubuntu Developer http://www.debian.org/ [email protected] [email protected]
signature.asc
Description: Digital signature
-- upstart-devel mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/upstart-devel
