mirror of
git://github.com/lxc/lxc
synced 2025-08-31 21:07:18 +00:00
Fail gracefully with attach
Fail when we try to attach to an non existing container Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
This commit is contained in:
@@ -65,8 +65,8 @@ pid_t get_init_pid(const char *name)
|
||||
|
||||
ret = lxc_command(name, &command, &stopped);
|
||||
if (ret < 0 && stopped) {
|
||||
INFO("'%s' is already stopped", name);
|
||||
return 0;
|
||||
ERROR("'%s' is not running", name);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (ret < 0) {
|
||||
|
Reference in New Issue
Block a user