edit format in operator else
This commit is contained in:
parent
1f2313dadb
commit
7253b8a07a
1 changed files with 6 additions and 3 deletions
|
|
@ -873,15 +873,18 @@ cli_start_program(clixon_handle h,
|
||||||
execlp(runner, runner, script_path, NULL);
|
execlp(runner, runner, script_path, NULL);
|
||||||
clixon_err(OE_PLUGIN, errno, "Error run script");
|
clixon_err(OE_PLUGIN, errno, "Error run script");
|
||||||
return -1;
|
return -1;
|
||||||
}else if(pid == -1){
|
}
|
||||||
|
else if(pid == -1){
|
||||||
clixon_err(OE_PLUGIN, errno, "fork");
|
clixon_err(OE_PLUGIN, errno, "fork");
|
||||||
}else{
|
}
|
||||||
|
else{
|
||||||
/* parent process */
|
/* parent process */
|
||||||
int status;
|
int status;
|
||||||
if (waitpid(pid, &status, 0) != pid ){
|
if (waitpid(pid, &status, 0) != pid ){
|
||||||
clixon_err(OE_PLUGIN, errno, "waitpid error");
|
clixon_err(OE_PLUGIN, errno, "waitpid error");
|
||||||
goto done;
|
goto done;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
return WEXITSTATUS(status);
|
return WEXITSTATUS(status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue