Subject: Re: route(8) doesn't always exit(1) on an error
To: None <tech-net@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: tech-net
Date: 11/15/2001 23:46:14
In article <20011115231122.A705@antioche.eu.org>,
Manuel Bouyer <bouyer@antioche.eu.org> wrote:
>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) ?

Too late, I fixed it.

christos