
perlbug-followup at perl
May 18, 2012, 3:19 PM
Post #1 of 15
(176 views)
Permalink
|
|
[perl #112990] Documentation for 'kill' should call more attention to using names instead of numbers
|
|
# New Ticket Created by Darin McBride # Please include the string: [perl #112990] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=112990 > This is a bug report for perl from dmcbride [at] cpan, generated with the help of perlbug 1.39 running under perl 5.15.9. ----------------------------------------------------------------- [Please describe your issue here] I was looking to see if I could figure out what number to pass in to kill for a particular signal (SIGINT). Reading the perldoc for kill wasn't informative at a quick glance, though an hour after asking on #p5p, someone pointed out the line that says this. It is buried in a paragraph actually talking about negative signals. I would suggest that "You may also use a signal name in quotes" should be expanded upon and get in its own paragraph. Preferably with either a list of signal names or a reference to where to find those signal names. If that's "kill -l", it should also suggest whether the SIG prefix is required (it doesn't seem to be - SIGKILL and KILL both work the same). And the doc should also mention if negative names work as negative numbers do. Note also that even without any other change, the docs are still misleading when you do notice everything: it's probably not the signal name being in quotes, but merely that it's a string: kill KILL => $$ works as well as kill 'KILL', $$. I'm sure kill $sig, $$ where $sig contains 'KILL' would work as well. I can't seem to find this list referenced in another pod, but I could have overlooked it. Note that perlipc does show examples of "kill HUP => $$" - which confused me until mauke pointed out the well-hidden line in perlfunc that said this would work. Also, perlfunc says: Unlike in the shell, if SIGNAL is negative, it kills process groups instead of processes. That means you usually want to use positive not negative signals. You may also use a signal name in quotes. But perlipc says: Sending a signal to a negative process ID means that you send the signal to the entire Unix process group. So, is it the signal being negative or the process ID or both? [Please do not change anything below this line] ----------------------------------------------------------------- --- Flags: category=docs severity=low --- Site configuration information for perl 5.15.9: Configured by dmcbride at Tue Mar 13 16:50:41 MDT 2012. Summary of my perl5 (revision 5 version 15 subversion 8) configuration: Commit id: 2630d42bb94232640db98e1de206d235e3f280fa Platform: osname=linux, osvers=3.2.1-gentoo-r2, archname=x86_64-linux-thread-multi uname='linux naboo 3.2.1-gentoo-r2 #1 smp thu jan 26 07:38:45 mst 2012 x86_64 intel(r) core(tm) i7 cpu 930 @ 2.80ghz genuineintel gnulinux ' config_args='' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=define, use64bitall=define, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2', cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector' ccversion='', gccversion='4.5.3', gccosandvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='cc', ldflags =' -fstack-protector -L/usr/local/lib' libpth=/usr/local/lib /lib/../lib64 /usr/lib/../lib64 /lib /usr/lib /lib64 /usr/lib64 /usr/local/lib64 libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc -lgdbm_compat perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc libc=/lib/libc-2.13.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='2.13' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector' Locally applied patches: --- @INC for perl 5.15.9: /home/dmcbride/perl/blead/lib/site_perl/5.15.8/x86_64-linux-thread-multi /home/dmcbride/perl/blead/lib/site_perl/5.15.8 /home/dmcbride/perl/blead/lib/5.15.8/x86_64-linux-thread-multi /home/dmcbride/perl/blead/lib/5.15.8 . --- Environment for perl 5.15.9: HOME=/home/dmcbride LANG=en_US.utf8 LANGUAGE= LC_ALL=en_US.utf8 LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/home/dmcbride/bin:/usr/lib/distcc/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/i686-pc-linux-gnu/gcc-bin/4.5.3:/usr/x86_64-pc-linux-gnu/gcc-bin/4.5.3:/share/cvs/bin:/usr/local/bin:/usr/games/bin:/share/bin:/share/darin/bin PERL_BADLANG (unset) SHELL=/bin/bash
|