[ovs-dev] [PATCH v3] ovs-lib: Return the exit status of ovs-ctl in ovs_ctl()

Ben Pfaff blp at nicira.com
Wed Oct 2 17:08:03 UTC 2013


On Wed, Oct 02, 2013 at 09:32:25AM -0700, Gurucharan Shetty wrote:
> From: Duffie Cooley <dcooley at nicira.com>
> 
> commit 46528f78e5c(debian, rhel, xenserver: Ability to collect ovs-ctl logs)
> made changes in the startup scripts such that the o/p of ovs-ctl is logged
> into ovs-ctl.log. But it had an unintended consequence that the exit status
> of ovs-ctl was no longer returned. We would always return success(the exit
> status of tee).
> 
> With this commit, we return the exit status of ovs-ctl instead of tee.
> Code referenced from: (line wrapped).
> http://unix.stackexchange.com/questions/14270/\
> get-exit-status-of-process-thats-piped-to-another/70675#70675)
> 
> Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>
> Signed-off-by: Duffie Cooley <dcooley at nicira.com>

Assuming you tested this and it works,
Acked-by: Ben Pfaff <blp at nicira.com>

Thanks for working out a portable solution that doesn't involve
temporary files or named pipes or other kluges.  This solution is
nasty in its own way, but I think it's better.



More information about the dev mailing list