microcom icon indicating copy to clipboard operation
microcom copied to clipboard

Allow logging to process

Open a3f opened this issue 6 years ago • 2 comments

While microcom's stdout can be piped to another processes, it makes
input somewhat of a hassle. Address this by teaching the --logfile flag
and the log command that a filename starting with a pipe character refers
to an executable to start and pipe the input into. The child process shares
stderr, but has stdout closed.

Signed-off-by: Ahmad Fatoum <[email protected]>

This pull request is rebased on top of #9 to avoid the merge conflict. I'll rebase when the other one is merged.

a3f avatar Aug 25 '19 20:08 a3f

I am not sure whether a --logexec command is more appropriate. Perl's open and Linux' /proc/sys/kernel/core_pattern are two examples I know of that interpret leading pipe as pipe-to-process instead of write-to-file, so I did it likewise.

a3f avatar Aug 25 '19 20:08 a3f

commit "Set O_CLOEXEC on newly opened file descriptors" looks fine. Didn't look in detail at the second patch yet. But as there are some changes requested in #9 I won't merge as is anyhow.

ukleinek avatar Aug 25 '19 21:08 ukleinek