On May 28, 11:15 pm, "William Stein" <[EMAIL PROTECTED]> wrote:
> On 5/28/07, mabshoff <[EMAIL PROTECTED]> wrote:
> > All have their specific advantages, I would just go with screen.
>
> > It might be worthwhile to offer an option for SAGE to demonize itself.
>
> That's a great idea; I've added it as
> http://www.sagemath.org:9002/sage_trac/ticket/381
>
> Any thoughts on how, e.g.,
> sage -notebookdaemon
> or ?? Also, how to implement it. I.e., could you be more precise
> about what it means to "demonize SAGE"?
>
Well, the idea is to detach the running SAGE instance from the shell
to let it run in the background until it is killed or the system is
rebooted.
There is more than one way to do it: For a good C example see
http://www.enderunix.org/docs/eng/daemon.php - for a python example
see http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66012
The python example could be more or less copied (I guess because I am
not a python expert), but it should be done very early in the SAGE
startup as far as I can tell. Writing a little C wrapper that just
does
i=fork();
if (i<0) exit(1); /* fork error */
if (i>0) exit(0); /* parent exits */
/* child (daemon) continues */
execv("./sage");
might be easier.
> william
Cheers,
Michael
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sage-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~----------~----~----~----~------~----~------~--~---