In route.c in newroute() there's a call to exit(0) if the command was
'get'. Since rtmsg() always gets called and returns 0 on success and -1 on failure, it's possible to exit with a suitable exit code by calling exit(ret != 0) instead, as is done at the end of newroute(). PR: bin/112303 Submitted by: bruce@cran.org.uk MFC after: 1 week
This commit is contained in:
parent
9939a13667
commit
6764f54349
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=177496
@ -748,7 +748,7 @@ newroute(argc, argv)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (*cmd == 'g')
|
if (*cmd == 'g')
|
||||||
exit(0);
|
exit(ret != 0);
|
||||||
if (!qflag) {
|
if (!qflag) {
|
||||||
oerrno = errno;
|
oerrno = errno;
|
||||||
(void) printf("%s %s %s", cmd, ishost? "host" : "net", dest);
|
(void) printf("%s %s %s", cmd, ishost? "host" : "net", dest);
|
||||||
|
Loading…
Reference in New Issue
Block a user