diff --git a/ext/lxc.c b/ext/lxc.c index 3fc553b..ff058ba 100644 --- a/ext/lxc.c +++ b/ext/lxc.c @@ -126,7 +126,8 @@ container_init_pid(VALUE self) Data_Get_Struct(self, struct container_data, data); pid = data->container->init_pid(data->container); - + if (pid < 0) + return Qnil; return INT2NUM(pid); }