microcom
microcom copied to clipboard
Allow logging to process
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.
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.
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.