From 8b21cef12943cab841ba9adabb8ce2360b04c65e Mon Sep 17 00:00:00 2001 From: Roopa Prabhu Date: Thu, 15 Oct 2015 15:23:50 -0700 Subject: [PATCH] ip route get: change exit to return to support batch commands replace exit with return -2 on rtnl_talk failure Signed-off-by: Roopa Prabhu --- ip/iproute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ip/iproute.c b/ip/iproute.c index da25548c5..b137f555d 100644 --- a/ip/iproute.c +++ b/ip/iproute.c @@ -1643,7 +1643,7 @@ static int iproute_get(int argc, char **argv) req.r.rtm_family = AF_INET; if (rtnl_talk(&rth, &req.n, &req.n, sizeof(req)) < 0) - exit(2); + return -2; if (connected && !from_ok) { struct rtmsg *r = NLMSG_DATA(&req.n); -- 2.47.2