ovs-check-dead-ifs: Flush buffer before calling execvp.
authorGurucharan Shetty <gshetty@nicira.com>
Fri, 20 Dec 2013 17:30:21 +0000 (09:30 -0800)
committerGurucharan Shetty <gshetty@nicira.com>
Fri, 20 Dec 2013 17:45:17 +0000 (09:45 -0800)
commit09daa5dfe6979894fe7e4962357b4260827f3cca
tree5163128b3d76d0ae9a05b8db115849cbc478502d
parentb1634591bc7103fa511c8a6a920b370641da3b0e
ovs-check-dead-ifs: Flush buffer before calling execvp.

According to Python documentation here for execvp:
http://docs.python.org/2/library/os.html
"The current process is replaced immediately. Open file objects
and descriptors are not flushed, so if there may be data buffered
on these open files, you should flush them using sys.stdout.flush()
or os.fsync() before calling an exec* function.

Without the flush, we will miss the print statements before that
if we redirect the o/p to a file.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
utilities/ovs-check-dead-ifs.in