diff options
author | Thien-Thi Nguyen <ttn@gnuvola.org> | 2004-05-10 17:37:02 +0000 |
---|---|---|
committer | Thien-Thi Nguyen <ttn@gnuvola.org> | 2004-05-10 17:37:02 +0000 |
commit | 7e31d8b0cf1f1f6bd7f74cf15b45b58b29f865a1 (patch) | |
tree | 76b6669ee1a920599181ba7696292cbc3488c419 | |
parent | 9e668c5d322c1aad5cc94df94f679e4783250356 (diff) | |
download | emacs-7e31d8b0cf1f1f6bd7f74cf15b45b58b29f865a1.tar.gz |
(main): For failing cases, exit with `EXIT_FAILURE'.
-rw-r--r-- | lib-src/ChangeLog | 4 | ||||
-rw-r--r-- | lib-src/test-distrib.c | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 70bbeed7efc..e52a20fac37 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,5 +1,9 @@ 2004-05-10 Thien-Thi Nguyen <ttn@gnu.org> + * test-distrib.c (main): For failing cases, exit with `EXIT_FAILURE'. + +2004-05-10 Thien-Thi Nguyen <ttn@gnu.org> + * test-distrib.c: Conditionally include fcntl.h. 2004-05-09 Thien-Thi Nguyen <ttn@gnu.org> diff --git a/lib-src/test-distrib.c b/lib-src/test-distrib.c index 9b720e1fc24..04dfe5caed8 100644 --- a/lib-src/test-distrib.c +++ b/lib-src/test-distrib.c @@ -79,13 +79,13 @@ main (argc, argv) if (argc != 2) { fprintf (stderr, "Usage: %s testfile\n", argv[0]); - exit (2); + exit (EXIT_FAILURE); } fd = open (argv[1], O_RDONLY); if (fd < 0) { perror (argv[1]); - exit (2); + exit (EXIT_FAILURE); } if (cool_read (fd, buf, sizeof string1) != sizeof string1 || strcmp (buf, string1) || @@ -96,7 +96,7 @@ main (argc, argv) Most likely this means that many nonprinting characters\n\ have been corrupted in the files of Emacs, and it will not work.\n", argv[1]); - exit (2); + exit (EXIT_FAILURE); } close (fd); return EXIT_SUCCESS; |