nelhage / reptyr

Reparent a running program to a new terminal
MIT License
5.82k stars 215 forks source link

daemonize (feature) #10

Open nbecker opened 13 years ago

nbecker commented 13 years ago

One thing often happens. I start some long-running process - maybe in emacs shell. Now I want to go home, but unfortunately, I did not use emacs --daemon. Too late now.

I can use reptyr (start new emacs --daemon + emacsclient, shell, reptry). But what I'd like is to daemonize the process. That is, redirect the stdout/stderr to a logfile (with configurable logfile behaviour), and then daemonize the process.

Seems like reptyr could be a useful tool for this. Any thoughts? Maybe make a daemonize.py python script, and invoke it from reptry from it after deamonize redirects it's stdout/stderr?

nelhage commented 13 years ago

Yeah, this seems like something reptyr could do. It's an easier problem than the one I solve, in that there's no need to worry about the termios wankery, but there's no reason not to support it.

I don't have a lot of time for reptyr hacking right at the moment, but I'll add it to my TODO list.

On Fri, May 06, 2011 at 10:03:51AM -0700, nbecker wrote:

One thing often happens. I start some long-running process - maybe in emacs shell. Now I want to go home, but unfortunately, I did not use emacs --daemon. Too late now.

I can use reptyr (start new emacs --daemon + emacsclient, shell, reptry). But what I'd like is to daemonize the process. That is, redirect the stdout/stderr to a logfile (with configurable logfile behaviour), and then daemonize the process.

Seems like reptyr could be a useful tool for this. Any thoughts? Maybe make a daemonize.py python script, and invoke it from reptry from it after deamonize redirects it's stdout/stderr?

Reply to this email directly or view it on GitHub: https://github.com/nelhage/reptyr/issues/10