Subject: Re: route(8) doesn't always exit(1) on an error
To: Tad Hunt <tad@entrisphere.com>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-net
Date: 11/15/2001 23:11:22
On Thu, Nov 15, 2001 at 01:00:22PM -0800, Tad Hunt wrote:
> 
> I want to use the route(8) (or an equivalent command) invoked from
> a program that adds and removes static routes.  I had been intending
> to look at the route(8) exit(2) value from the my program to
> determine if the route was successfully added or not.  However, it
> seems as though short of getting the arguments wrong and exiting
> with a usage error, route(8) always exits 0 (via a return 0 in
> main())
> 
> Is there a workaround for this behavior so I can invoke add and
> remove static routes from my program?  I would prefer *not* doing
> a popen(3), and reading the route(8) output.

Maybe you could fix the exit() usages and submit a PR (using send-pr) ?

--
Manuel Bouyer <bouyer@antioche.eu.org>
--