]> granicus.if.org Git - procps-ng/commitdiff
empty signal name fix
authoralbert <>
Tue, 1 Oct 2002 22:14:13 +0000 (22:14 +0000)
committeralbert <>
Tue, 1 Oct 2002 22:14:13 +0000 (22:14 +0000)
proc/sig.c

index 46dd8470d14088d2bd5610950bf4913f1a7fabc4..3f35d31b6e382e3d9583001a7718daeeb122ae15 100644 (file)
@@ -134,7 +134,7 @@ int signal_name_to_number(char *name){
 
   /* not found, so try as a number */
   val = strtol(name,&endp,10);
-  if(*endp) return -1; /* not valid */
+  if(*endp || endp==name) return -1; /* not valid */
   if(val+SIGRTMIN>127) return -1; /* not valid */
   return val+offset;
 }