You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is a demonstration of running a shell script under kcov, which makes the output go missing:
nimble% cat ./kcov_test/date.sh
#!/bin/sh
[ "$1" ] && exec >&8
date
% ./kcov_test/date.sh
Thu 25 May 09:32:29 CEST 2023
% kcov ./kcov_test/output ./kcov_test/date.sh
% kcov ./kcov_test/output ./kcov_test/date.sh redir_to_8
./kcov_test/date.sh: line 2: 8: Bad file descriptor
% kcov ./kcov_test/output ./kcov_test/date.sh redir_to_8 8>&1
Thu 25 May 09:32:33 CEST 2023
% kcov ./kcov_test/output date
Thu 25 May 09:32:55 CEST 2023
% kcov --version
kcov 38
That was on a Debian GNU/Linux 13 (aka "bookworm" or testing) system, with the packaged version of kcov (ver: 38+dfsg-1).
As you can see, if one redirects STDOUT in the script to FD 8 (chosen at random) and then redirect that back to STDOUT outside kcov, things work as expected. I presume this is unexpected.
I've had a glance at the Debian specific patches, and I don't see how they would produce this effect, so I suspect that it exists upstream, which is why I'm reporting this here.
The text was updated successfully, but these errors were encountered:
Here is a demonstration of running a shell script under kcov, which makes the output go missing:
That was on a Debian GNU/Linux 13 (aka "bookworm" or testing) system, with the packaged version of kcov (ver: 38+dfsg-1).
As you can see, if one redirects STDOUT in the script to FD 8 (chosen at random) and then redirect that back to STDOUT outside kcov, things work as expected. I presume this is unexpected.
I've had a glance at the Debian specific patches, and I don't see how they would produce this effect, so I suspect that it exists upstream, which is why I'm reporting this here.
The text was updated successfully, but these errors were encountered: