Lines 151-157
run_exited(GPid pid, gint status, gpoint
Link Here
|
151 |
run_data *rd = (run_data *)data; |
151 |
run_data *rd = (run_data *)data; |
152 |
char **error = NULL; |
152 |
char **error = NULL; |
153 |
|
153 |
|
154 |
printf("pid %d: rc=%d signaled=%d: %s\n", |
154 |
fprintf(stderr,"pid %d: rc=%d signaled=%d: %s\n", |
155 |
pid, WEXITSTATUS(status), WIFSIGNALED(status), rd->r->argv[0]); |
155 |
pid, WEXITSTATUS(status), WIFSIGNALED(status), rd->r->argv[0]); |
156 |
rd->watch = 0; |
156 |
rd->watch = 0; |
157 |
if (rd->sent_kill == TRUE) { |
157 |
if (rd->sent_kill == TRUE) { |
Lines 252-258
run_request_run (run_request *r, DBusCon
Link Here
|
252 |
char *program_dir = NULL; |
252 |
char *program_dir = NULL; |
253 |
GList *list; |
253 |
GList *list; |
254 |
|
254 |
|
255 |
printf("Run started %s (%u) (%d) \n!", r->argv[0], r->timeout, |
255 |
fprintf(stderr,"Run started %s (%u) (%d) \n!", r->argv[0], r->timeout, |
256 |
r->error_on_stderr); |
256 |
r->error_on_stderr); |
257 |
if (r->input != NULL) { |
257 |
if (r->input != NULL) { |
258 |
stdin_p = &stdin_v; |
258 |
stdin_p = &stdin_v; |
Lines 266-272
run_request_run (run_request *r, DBusCon
Link Here
|
266 |
if (program_exists) |
266 |
if (program_exists) |
267 |
program_dir = g_path_get_dirname (r->argv[0]); |
267 |
program_dir = g_path_get_dirname (r->argv[0]); |
268 |
|
268 |
|
269 |
printf(" full path is '%s', program_dir is '%s'\n", r->argv[0], program_dir); |
269 |
fprintf(stderr," full path is '%s', program_dir is '%s'\n", r->argv[0], program_dir); |
270 |
|
270 |
|
271 |
if (!program_exists || |
271 |
if (!program_exists || |
272 |
!g_spawn_async_with_pipes(program_dir, r->argv, r->environment, |
272 |
!g_spawn_async_with_pipes(program_dir, r->argv, r->environment, |
Lines 283-289
run_request_run (run_request *r, DBusCon
Link Here
|
283 |
|
283 |
|
284 |
if (r->input) { |
284 |
if (r->input) { |
285 |
if (write(stdin_v, r->input, strlen(r->input)) != (ssize_t) strlen(r->input)) |
285 |
if (write(stdin_v, r->input, strlen(r->input)) != (ssize_t) strlen(r->input)) |
286 |
printf("Warning: Error while writing r->input (%s) to stdin_v.\n", r->input); |
286 |
fprintf(stderr,"Warning: Error while writing r->input (%s) to stdin_v.\n", r->input); |
287 |
close(stdin_v); |
287 |
close(stdin_v); |
288 |
} |
288 |
} |
289 |
|
289 |
|
Lines 333-339
kill_rd(gpointer data, gpointer user_dat
Link Here
|
333 |
run_data *rd = (run_data *)data; |
333 |
run_data *rd = (run_data *)data; |
334 |
|
334 |
|
335 |
kill(rd->pid, SIGTERM); |
335 |
kill(rd->pid, SIGTERM); |
336 |
printf("Sent kill to %d\n", rd->pid); |
336 |
fprintf(stderr,"Sent kill to %d\n", rd->pid); |
337 |
if (rd->timeout != 0) { |
337 |
if (rd->timeout != 0) { |
338 |
/* Remove the timeout watch */ |
338 |
/* Remove the timeout watch */ |
339 |
g_source_remove(rd->timeout); |
339 |
g_source_remove(rd->timeout); |