Skip to content

Commit 2f80865

Browse files
committed
Add a little extra debugging info.
1 parent b2a4443 commit 2f80865

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/exec_pty.c

+6-1
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ write_callback(int fd, int what, void *v)
487487
}
488488
} else {
489489
sudo_debug_printf(SUDO_DEBUG_INFO,
490-
"wrote %zd bytes to fd %d", n, fd);
490+
"wrote %zd of %u bytes to fd %d", n, iob->len - iob->off, fd);
491491
iob->off += (unsigned int)n;
492492
/* Disable writer and reset the buffer if fully consumed. */
493493
if (iob->off == iob->len) {
@@ -1258,6 +1258,11 @@ exec_pty(struct command_details *details,
12581258
ec->term_raw = true;
12591259
}
12601260

1261+
sudo_debug_printf(SUDO_DEBUG_INFO,
1262+
"%s: follower: %d, stdin: %d, stdout: %d, stderr: %d", __func__,
1263+
io_fds[SFD_FOLLOWER], io_fds[SFD_STDIN], io_fds[SFD_STDOUT],
1264+
io_fds[SFD_STDERR]);
1265+
12611266
/*
12621267
* Block signals until we have our handlers setup in the parent so
12631268
* we don't miss SIGCHLD if the command exits immediately.

0 commit comments

Comments
 (0)