]> andersk Git - moira.git/commitdiff
exit cleanly on ^D
authormar <mar>
Mon, 26 Dec 1988 14:19:55 +0000 (14:19 +0000)
committermar <mar>
Mon, 26 Dec 1988 14:19:55 +0000 (14:19 +0000)
clients/passwd/chsh.c

index 75bb9ed10ed6b6ced510d7261ec358810bb9e33d..f0fee82152f667b4b16083e74df6ab6f29259f55 100644 (file)
@@ -156,7 +156,8 @@ chsh(uname)
     while (!got_one)
     {
        printf("New shell: ");
-       (void) fgets(shell, sizeof(shell), stdin);
+       if (fgets(shell, sizeof(shell), stdin) == NULL)
+         leave(0);
        got_one = (strlen(shell) > 1);
     }
 
This page took 0.047428 seconds and 5 git commands to generate.