Skip to content

Commit

Permalink
subprocess local debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
chu11 committed Aug 29, 2018
1 parent 9b7508c commit ad09dc1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/common/subprocess/local.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,11 @@ static void local_output (struct subprocess_channel *c,
{
bool eof_set = false;

flux_log (c->p->h, LOG_ERR, "local: pid = %d, revents = %d, channels eof_expected %d, channesl eof_sent %d", c->p->pid, revents, c->p->channels_eof_expected, c->p->channels_eof_sent);
if (revents & FLUX_POLLIN) {
flux_buffer_t *fb;
flux_log (c->p->h, LOG_ERR, "local: local_output: pid = %d, state = %s, eof_sent = %d", c->p->pid, flux_subprocess_state_string (c->p->state), c->eof_sent_to_caller);

if (!c->eof_sent_to_caller) {

if (!(fb = flux_buffer_read_watcher_get_buffer (w))) {
Expand All @@ -116,6 +119,7 @@ static void local_output (struct subprocess_channel *c,
eof_set = true;
c->p->channels_eof_sent++;
}
flux_log (c->p->h, LOG_ERR, "local: local_output: pid = %d, state = %s, eof_set = %d", c->p->pid, flux_subprocess_state_string (c->p->state), eof_set);
}

output_cb (c->p, c->name);
Expand All @@ -135,6 +139,8 @@ static void local_output (struct subprocess_channel *c,
eof_set = true;
c->p->channels_eof_sent++;
}

flux_log (c->p->h, LOG_ERR, "local: local_output - post cb: pid = %d, state = %s, eof_set = %d", c->p->pid, flux_subprocess_state_string (c->p->state), eof_set);
}
}
else
Expand Down Expand Up @@ -579,6 +585,7 @@ static void child_watch_cb (flux_reactor_t *r, flux_watcher_t *w,
*/
if (p->state == FLUX_SUBPROCESS_RUNNING) {
p->state = FLUX_SUBPROCESS_EXITED;
flux_log (p->h, LOG_ERR, "local: child_watch - pid = %d, state = %s, exited", p->pid, flux_subprocess_state_string (p->state));
state_change_start (p);
}

Expand Down

0 comments on commit ad09dc1

Please sign in to comment.