Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: SUGGESTION: kill -l could show numbers, too (+CLD vs CHLD)



Stephane Chazelas wrote:
> Why SIGCLD and not SIGCHLD for zsh?

It's an artefact of this sort of thing in header files:

#define	SIGCLD		SIGCHLD	/* Same as SIGCHLD (System V).  */
#define	SIGCHLD		17	/* Child status has changed (POSIX).  */

We pick the first one, assuming that's to be preferred.

The following explicitly prefers SIGCHLD.  Any other multiple signals
can be handled similarly.  I'm not sure about SIGPOLL.

Maybe we should think about mapping alternatives so that both kill -CLD
and kill -CHLD work.

Index: Src/signames2.awk
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/signames2.awk,v
retrieving revision 1.3
diff -u -r1.3 signames2.awk
--- Src/signames2.awk	12 Mar 2004 09:59:24 -0000	1.3
+++ Src/signames2.awk	18 Nov 2004 17:15:22 -0000
@@ -12,6 +12,7 @@
     split(sigtail, tmp)
     signam = substr(tmp[1], 4, 20)
     signum = tmp[2]
+    if (signam == "CHLD" && sig[signum] == "CLD")  sig[signum] = ""
     if (sig[signum] == "") {
 	sig[signum] = signam
 	if (0 + max < 0 + signum && signum < 60)

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************



Messages sorted by: Reverse Date, Date, Thread, Author