version 1.58, 2018/05/24 09:42:49 |
version 1.59, 2018/08/23 15:45:05 |
|
|
static void |
static void |
cmd_if_shell_callback(struct job *job) |
cmd_if_shell_callback(struct job *job) |
{ |
{ |
struct cmd_if_shell_data *cdata = job->data; |
struct cmd_if_shell_data *cdata = job_get_data(job); |
struct client *c = cdata->client; |
struct client *c = cdata->client; |
struct cmd_list *cmdlist; |
struct cmd_list *cmdlist; |
struct cmdq_item *new_item; |
struct cmdq_item *new_item; |
char *cause, *cmd, *file = cdata->file; |
char *cause, *cmd, *file = cdata->file; |
u_int line = cdata->line; |
u_int line = cdata->line; |
|
int status; |
|
|
if (!WIFEXITED(job->status) || WEXITSTATUS(job->status) != 0) |
status = job_get_status(job); |
|
if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) |
cmd = cdata->cmd_else; |
cmd = cdata->cmd_else; |
else |
else |
cmd = cdata->cmd_if; |
cmd = cdata->cmd_if; |