Description: 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.
 This patch will be forwarded upstream.
Author: Serge Hallyn <serge.hallyn@ubuntu.com>
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/938765
Forwarded: yes

Index: lxc-0.7.5/src/lxc/commands.c
===================================================================
--- lxc-0.7.5.orig/src/lxc/commands.c	2012-02-22 11:09:03.000000000 -0600
+++ lxc-0.7.5/src/lxc/commands.c	2012-02-22 11:27:42.801353944 -0600
@@ -273,7 +273,12 @@
 
 	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;
 	}
 
