int lxc_execute(const char *name, char *const argv[], int quiet,
struct lxc_handler *handler, const char *lxcpath,
- bool backgrounded, int *error_num)
+ bool daemonize, int *error_num)
{
struct execute_args args = {.argv = argv, .quiet = quiet};
TRACE("Doing lxc_execute");
handler->conf->is_execute = true;
return __lxc_start(name, handler, &execute_start_ops, &args, lxcpath,
- backgrounded, error_num);
+ daemonize, error_num);
}
* @name : the name of the container
* @argv : an array of char * corresponding to the commande line
* @conf : configuration
- * @backgrounded : whether or not the container is daemonized
+ * @daemonize : whether or not the container is daemonized
* Returns 0 on success, < 0 otherwise
*/
extern int lxc_start(const char *name, char *const argv[],
struct lxc_handler *handler, const char *lxcpath,
- bool backgrounded, int *error_num);
+ bool daemonize, int *error_num);
/*
* Start the specified command inside an application container
* @argv : an array of char * corresponding to the commande line
* @quiet : if != 0 then lxc-init won't produce any output
* @conf : configuration
- * @backgrounded : whether or not the container is daemonized
+ * @daemonize : whether or not the container is daemonized
* Returns 0 on success, < 0 otherwise
*/
extern int lxc_execute(const char *name, char *const argv[], int quiet,
struct lxc_handler *handler, const char *lxcpath,
- bool backgrounded, int *error_num);
+ bool daemonize, int *error_num);
/*
* Close the fd associated with the monitoring
{
ssize_t ret;
- if (!handler->backgrounded ||
+ if (!handler->daemonize ||
handler->state_socket_pair[1] < 0 ||
state == STARTING)
return 0;
* means that migration won't work, but at least we won't spew output
* where it isn't wanted.
*/
- if (handler->backgrounded && !handler->conf->autodev) {
+ if (handler->daemonize && !handler->conf->autodev) {
ret = access(path, F_OK);
if (ret != 0) {
devnull_fd = open_devnull();
* make sure that that pty is stdin,stdout,stderr.
*/
if (handler->conf->console.slave >= 0) {
- if (handler->backgrounded || !handler->conf->is_execute)
+ if (handler->daemonize || !handler->conf->is_execute)
ret = set_stdfds(handler->conf->console.slave);
else
ret = lxc_terminal_set_stdfds(handler->conf->console.slave);
close(handler->sigfd);
- if (handler->conf->console.slave < 0 && handler->backgrounded) {
+ if (handler->conf->console.slave < 0 && handler->daemonize) {
if (devnull_fd < 0) {
devnull_fd = open_devnull();
if (devnull_fd < 0)
int __lxc_start(const char *name, struct lxc_handler *handler,
struct lxc_operations* ops, void *data, const char *lxcpath,
- bool backgrounded, int *error_num)
+ bool daemonize, int *error_num)
{
int ret, status;
struct lxc_conf *conf = handler->conf;
}
handler->ops = ops;
handler->data = data;
- handler->backgrounded = backgrounded;
+ handler->daemonize = daemonize;
if (!attach_block_device(handler->conf)) {
ERROR("Failed to attach block device");
};
int lxc_start(const char *name, char *const argv[], struct lxc_handler *handler,
- const char *lxcpath, bool backgrounded, int *error_num)
+ const char *lxcpath, bool daemonize, int *error_num)
{
struct start_args start_arg = {
.argv = argv,
};
TRACE("Doing lxc_start");
- return __lxc_start(name, handler, &start_ops, &start_arg, lxcpath, backgrounded, error_num);
+ return __lxc_start(name, handler, &start_ops, &start_arg, lxcpath, daemonize, error_num);
}
static void lxc_destroy_container_on_signal(struct lxc_handler *handler,