]> granicus.if.org Git - psmisc/commitdiff
fuser signal names
authorCraig Small <csmall@users.sourceforge.net>
Wed, 4 Jan 2006 01:14:20 +0000 (01:14 +0000)
committerCraig Small <csmall@users.sourceforge.net>
Wed, 4 Jan 2006 01:14:20 +0000 (01:14 +0000)
ChangeLog
src/fuser.c

index 7db4a9716a6c0c6bf4d4cc9b0608494ab3334a23..f931a55beb062dde8b8eedeff2a96683ece87129 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 Changes in 22.1
 ===============
+2006-01-04 Craig Small
+       * fuser signals eg -INT work better
+
 2005-12-16 Craig Small
        * fuser -s flag works Debian #344901
        * fix grep lines in Makefile for i386 arches Debian #344172
index 6e147933b94c1a2710336761a1659e42e9635274..da307d710e399ccd25d4629270059e66d226658a 100644 (file)
@@ -655,7 +655,8 @@ int main(int argc, char *argv[])
                                /* FIXME longopts */
                                continue;
                        }
-                       while (*option) switch(*option++) {
+                       while (*option) {
+                               switch(*option) {
 #ifdef WITH_IPV6
                                case '4':
                                        ipv4_only = 1;
@@ -717,13 +718,17 @@ int main(int argc, char *argv[])
                                default:
                                        if ( isupper(*option) || isdigit(*option) ) {
                                                sig_number = get_signal(option,"fuser");
+                                               option[1]='\0';
+
                                                break;
                                        }
                                        fprintf(stderr,"%s: Invalid option %c\n",argv[0] , argv[optc][1]);
-
                                        usage(NULL);
+
                                        break;
-                       } /* switch */
+                               } /* switch */
+                               option++;
+                       }
                        continue;
                }
                /* File specifications */