Signed-off-by: Stéphane Graber <[email protected]>
---
src/lxc/lxc_monitor.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/lxc/lxc_monitor.c b/src/lxc/lxc_monitor.c
index 63ab68b..92477e2 100644
--- a/src/lxc/lxc_monitor.c
+++ b/src/lxc/lxc_monitor.c
@@ -93,11 +93,16 @@ int main(int argc, char *argv[])
fd = lxc_monitor_open(my_args.lxcpath[i]);
if (fd < 0) {
- ERROR("Unable to open monitor on path:%s",
my_args.lxcpath[i]);
+ ERROR("Unable to open monitor on path: %s",
my_args.lxcpath[i]);
ret = EXIT_FAILURE;
continue;
}
- write(fd, "quit", 4);
+ if (write(fd, "quit", 4) < 0) {
+ ERROR("Unable to close monitor on path: %s",
my_args.lxcpath[i]);
+ ret = EXIT_FAILURE;
+ close(fd);
+ continue;
+ }
close(fd);
}
return ret;
--
1.8.5.1
------------------------------------------------------------------------------
Sponsored by Intel(R) XDK
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
lxc-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lxc-devel