NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/58786: ctags: incorrect exit status
>Number: 58786
>Category: bin
>Synopsis: ctags: incorrect exit status
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Oct 29 07:10:00 +0000 2024
>Originator: RVP
>Release: NetBSD/amd64 10.99.12
>Organization:
>Environment:
NetBSD/amd64 10.99.12
>Description:
If ctags(1) can't open the tags file, it exits with EXIT_SUCCESS
instead of EXIT_FAILURE.
>How-To-Repeat:
$ id -nu
rvp
$ ctags -f /etc/tags /usr/src/bin/ls/ls.c || echo FAIL
ctags: /etc/tags: Permission denied
$
>Fix:
--START patch--
--- ctags.c.orig 2024-02-11 02:25:14.064244038 +0000
+++ ctags.c 2024-10-29 06:49:05.471202069 +0000
@@ -167,7 +167,7 @@
++aflag;
}
if (!(outf = fopen(outfile, aflag ? "a" : "w")))
- err(exit_val, "%s", outfile);
+ err(EXIT_FAILURE, "%s", outfile);
put_entries(head);
(void)fclose(outf);
if (uflag) {
--END patch--
Home |
Main Index |
Thread Index |
Old Index