Ticket #689 (new enhancement )

Opened 4 years ago

Last modified 3 months ago

twistd man page needs a section on signals

Reported by: anthony Assigned to: thijs
Type: enhancement Priority: normal
Milestone: Component: core
Keywords: documentation Cc: anthony, thijs
Branch: branches/twisted-man-signals-689 Author: thijs
Launchpad Bug:

Attachments

Change History

  2004-08-27 14:32:39+00:00 changed by anthony

doc/man/twistd.1 needs a short section on signals. A running twistd accepts
SIGINT for a clean shutdown, and SIGUSR1 for 'rotate log files'.

  2006-06-24 23:09:41+00:00 changed by hypatia

  • cc changed from anthony, hypatia to anthony
  • owner changed from hypatia to edsuom
  • component set to core

  2008-07-31 00:10:12+00:00 changed by thijs

  • cc changed from anthony to anthony, thijs
  • owner changed from edsuom to thijs
  • status changed from new to assigned
  • branch deleted
  • author deleted

  2008-07-31 00:11:32+00:00 changed by thijs

  • branch set to branches/twisted-man-signals-689
  • author set to thijs

(In [24470]) Branching to 'twisted-man-signals-689'

  2008-07-31 00:30:40+00:00 changed by thijs

  • keywords changed from documentation to documentation, review
  • owner deleted
  • status changed from assigned to new

follow-up: ↓ 7   2008-08-04 17:55:48+00:00 changed by exarkun

  • keywords changed from documentation, review to documentation
  • owner set to thijs

There seems to be precedent for a dedicated SIGNALS section (eg bash, Xserver, skill, snice, epic4, etc).

I'd put this info into such a section. Also note there's an existing mention of signals in the docs for the --debug option in that man page. The docs there are incomplete, since both SIGINT and SIGUSR2 drop into the debugger.

in reply to: ↑ 6 ; follow-up: ↓ 8   2008-08-05 22:53:45+00:00 changed by thijs

Replying to exarkun:

There seems to be precedent for a dedicated SIGNALS section (eg bash, Xserver, skill, snice, epic4, etc).

Haven't checked the source or google yet, but where would i find this info? Is it specific to twistd?

I'd put this info into such a section. Also note there's an existing mention of signals in the docs for the --debug option in that man page. The docs there are incomplete, since both SIGINT and SIGUSR2 drop into the debugger.

Made the suggested change in r24538

in reply to: ↑ 7   2008-08-19 16:26:56+00:00 changed by thijs

  • keywords changed from documentation to documentation, review
  • owner changed from thijs to exarkun

Replying to thijs:

Replying to exarkun:

There seems to be precedent for a dedicated SIGNALS section (eg bash, Xserver, skill, snice, epic4, etc).

Haven't checked the source or google yet, but where would i find this info? Is it specific to twistd?

Something like the list below?

$ python signal_getsignal.py
SIGHUP     ( 1): SIG_DFL
SIGINT     ( 2): <built-in function default_int_handler>
SIGQUIT    ( 3): SIG_DFL
SIGILL     ( 4): SIG_DFL
SIGTRAP    ( 5): SIG_DFL
SIGIOT     ( 6): SIG_DFL
SIGEMT     ( 7): SIG_DFL
SIGFPE     ( 8): SIG_DFL
SIGKILL    ( 9): None
SIGBUS     (10): SIG_DFL
SIGSEGV    (11): SIG_DFL
SIGSYS     (12): SIG_DFL
SIGPIPE    (13): SIG_IGN
SIGALRM    (14): <function alarm_received at 0x7c3f0>
SIGTERM    (15): SIG_DFL
SIGURG     (16): SIG_DFL
SIGSTOP    (17): None
SIGTSTP    (18): SIG_DFL
SIGCONT    (19): SIG_DFL
SIGCHLD    (20): SIG_DFL
SIGTTIN    (21): SIG_DFL
SIGTTOU    (22): SIG_DFL
SIGIO      (23): SIG_DFL
SIGXCPU    (24): SIG_DFL
SIGXFSZ    (25): SIG_IGN
SIGVTALRM  (26): SIG_DFL
SIGPROF    (27): SIG_DFL
SIGWINCH   (28): SIG_DFL
SIGINFO    (29): SIG_DFL
SIGUSR1    (30): SIG_DFL
SIGUSR2    (31): SIG_DFL

Generated with the script from this place:

import signal
import pprint
def alarm_received(n, stack):
    return
signal.signal(signal.SIGALRM, alarm_received)
signals_to_names = {}
for n in dir(signal):
    if n.startswith('SIG') and not n.startswith('SIG_'):
        signals_to_names[getattr(signal, n)] = n
for s in xrange(1, signal.NSIG):
    name = signals_to_names[s]
    handler = signal.getsignal(s)
    if handler is signal.SIG_DFL:
        handler = 'SIG_DFL'
    elif handler is signal.SIG_IGN:
        handler = 'SIG_IGN'
    print '%-10s (%2d):' % (name, s), handler

  2008-08-23 15:26:06+00:00 changed by exarkun

  • keywords changed from documentation, review to documentation
  • owner changed from exarkun to thijs

Delete the winefish-related additions. The quotes around "rotate log files" aren't really necessary. Also, I'd put the signals section directly above the author section. Options are more interesting than signals. For some reason, the "SIGNALS" header is rendering indented in my man reader. Do you see that as well?

Note: See TracTickets for help on using tickets.