Opened 11 years ago

Last modified 5 years ago

#2606 new enhancement

command line option to kill a background notebook

Reported by: nbruin Owned by: boothby
Priority: minor Milestone: sage-6.4
Component: notebook Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by kcrisman)

Since running sage -notebook now checks if another instance is already running, it would be fairly straightforward to create an option that kills that notebook process as well.

The rationale is that it is probably much easier for a user to recreate the circumstances under which the notebook was started, and hence enable sage to find the relevant PID file, than to figure out where that PID file is stored.

Given the code in sage.server.notebook.run_notebook it can be rather involved to track down where twistd.pid gets stored (and it might change in the future too), being able to get a hold of the pidfile in a general way would make startup scripts much more robust (the location of twistd.pid has already changed once)

As an example, daemon-like services such as vncserver and dhclient have "-kill" and "-r" options to kill previously started instances in a way that takes the burden from the user to figure out which PID to kill.

One should probably first address #2359

Change History (6)

comment:1 Changed 11 years ago by was

Can you suggest a very specific design? E.g.,

sage: notebook.killall()
... kills all running notebook servers
sage: notebook.pids()
... shows pids' of all running notebook servers
sage: notebook.urls()
... shows urls...

What do you think?

comment:2 Changed 8 years ago by kcrisman

  • Description modified (diff)
  • Report Upstream set to N/A

comment:3 Changed 6 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:4 Changed 5 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:5 Changed 5 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:6 Changed 5 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4
Note: See TracTickets for help on using tickets.