From: Serge Hallyn Date: Wed, 22 Feb 2012 17:40:16 +0000 (-0600) Subject: If a container is already running, say so in error msgs. X-Git-Tag: lxc-0.8.0-rc2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97d3756cbe108e564d1a1b6cc23c02d379c3c02e;p=thirdparty%2Flxc.git If a container is already running, say so in error msgs. Otherwise there is no clear indication to the user why the container startup failed. Signed-off-by: Serge Hallyn Signed-off-by: Daniel Lezcano --- diff --git a/src/lxc/commands.c b/src/lxc/commands.c index f32394319..1d488aed2 100644 --- a/src/lxc/commands.c +++ b/src/lxc/commands.c @@ -271,7 +271,12 @@ extern int lxc_command_mainloop_add(const char *name, fd = lxc_af_unix_open(path, SOCK_STREAM, 0); if (fd < 0) { - ERROR("failed to create the command service point"); + ERROR("failed (%d) to create the command service point %s", errno, offset); + if (errno == EADDRINUSE) { + ERROR("##"); + ERROR("# The container appears to be already running!"); + ERROR("##"); + } return -1; }