mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
exec: start executable in exec_prepare() rather than exec_start()
This commit is contained in:
parent
b3dc60e605
commit
7ad5c58d0e
1 changed files with 5 additions and 5 deletions
|
@ -74,6 +74,10 @@ int exec_prepare(struct node *n)
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* Start subprocess */
|
||||
e->proc = std::make_unique<Popen>(e->command);
|
||||
debug(2, "Started sub-process with pid=%d", e->proc->getPid());
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -91,11 +95,7 @@ int exec_destroy(struct node *n)
|
|||
|
||||
int exec_start(struct node *n)
|
||||
{
|
||||
struct exec *e = (struct exec *) n->_vd;
|
||||
|
||||
/* Start subprocess */
|
||||
e->proc = std::make_unique<Popen>(e->command);
|
||||
debug(2, "Started sub-process with pid=%d", e->proc->getPid());
|
||||
// struct exec *e = (struct exec *) n->_vd;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue