[Nagiosplug-devel] [Fwd: [Nagiosplug-checkins] SF.net SVN: nagiosplug: [1889] nagiosplug/trunk/lib/tests/test_cmd.c]

Ton Voon ton.voon at altinity.com
Sun Jan 6 18:02:54 CET 2008


Hi Thomas,

On 6 Jan 2008, at 07:25, Thomas Guyot-Sionnest wrote:

> If we want to specifically test the return status I suggest we do it  
> as
> a separate test, like doing something like:
>
>  strcpy(command, "/bin/sh -c 'exit 7'");
>  result = cmd_run (command, &chld_out, &chld_err, 0);
>  ok (result == 7, "Get return code 7 from /bin/sh");
>
> Which seems to work well on all shells tested

That looks like a decent compromise.

Ton

http://www.altinity.com
UK: +44 (0)870 787 9243
US: +1 866 879 9184
Fax: +44 (0)845 280 1725
Skype: tonvoon





More information about the Devel mailing list