components/zsh/patches/4500760.patch
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Mon, 11 Mar 2013 10:38:09 -0700
branchs11-update
changeset 2520 ceec631e74d1
parent 837 3496f33edfbb
permissions -rw-r--r--
Close of build 10.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
837
3496f33edfbb 7170543 zsh 4.3.17
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     1
--- zsh-4.3.17/Src/jobs.c	Sat Dec 10 14:40:56 2011
3496f33edfbb 7170543 zsh 4.3.17
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     2
+++ zsh-4.3.17/Src/jobs.c	Sat May 19 23:24:16 2012
3496f33edfbb 7170543 zsh 4.3.17
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     3
@@ -2157,9 +2157,15 @@
3496f33edfbb 7170543 zsh 4.3.17
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     4
 
3496f33edfbb 7170543 zsh 4.3.17
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     5
     /* check for, and interpret, a signal specifier */
3496f33edfbb 7170543 zsh 4.3.17
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     6
     if (*argv && **argv == '-') {
3496f33edfbb 7170543 zsh 4.3.17
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     7
-	if (idigit((*argv)[1]))
3496f33edfbb 7170543 zsh 4.3.17
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     8
+	if (idigit((*argv)[1])) {
3496f33edfbb 7170543 zsh 4.3.17
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     9
+	    char *endp;
3496f33edfbb 7170543 zsh 4.3.17
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    10
 	    /* signal specified by number */
3496f33edfbb 7170543 zsh 4.3.17
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    11
-	    sig = atoi(*argv + 1);
3496f33edfbb 7170543 zsh 4.3.17
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    12
+	    sig = zstrtol(*argv + 1, &endp, 10);
3496f33edfbb 7170543 zsh 4.3.17
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    13
+	    if (*endp) {
3496f33edfbb 7170543 zsh 4.3.17
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    14
+		zwarnnam(nam, "invalid signal number: %s", *argv);
3496f33edfbb 7170543 zsh 4.3.17
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    15
+		return 1;
3496f33edfbb 7170543 zsh 4.3.17
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    16
+	    }
3496f33edfbb 7170543 zsh 4.3.17
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    17
+	}
3496f33edfbb 7170543 zsh 4.3.17
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    18
 	else if ((*argv)[1] != '-' || (*argv)[2]) {
3496f33edfbb 7170543 zsh 4.3.17
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    19
 	    char *signame;
3496f33edfbb 7170543 zsh 4.3.17
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    20