From: Todd C. Miller Date: Sun, 4 Feb 1996 21:36:17 +0000 (+0000) Subject: unixware vi returns 256 instead of 0 X-Git-Tag: SUDO_1_5_0~287 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=845ee30d76a7f270887b58d041439d3e9d39a827;p=sudo unixware vi returns 256 instead of 0 --- diff --git a/visudo.c b/visudo.c index f5003003f..1dcf11484 100644 --- 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 */