]> granicus.if.org Git - sudo/commitdiff
unixware vi returns 256 instead of 0
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 4 Feb 1996 21:36:17 +0000 (21:36 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 4 Feb 1996 21:36:17 +0000 (21:36 +0000)
visudo.c

index f5003003f1eafa0226b7fc01f21c1abc3c9f5d51..1dcf1148440f52c4ee4943bd9d4e4728f1e284b9 100644 (file)
--- a/visudo.c
+++ b/visudo.c
@@ -236,8 +236,9 @@ int main(argc, argv)
        else
            (void) sprintf(buf, "%s %s", Editor, stmp);
 
-       /* do the edit */
-       if (system(buf) == 0) {
+       /* do the edit -- some SYSV editors return 256 instead of 0 */
+       n = system(buf);
+       if (n == 0 || n == 256) {
            struct stat statbuf;        /* for sanity checking */
 
            /* make sure stmp exists */