Following examples show the cases.
% ktrace -f - false >/dev/null && echo wrong
wrong
% ktrace -f - -i /usr/sbin/update >/dev/null
(does not return to command line)
That is, back out last change and restore the roles of parent/child for
ktrace(1). The ktruss(1) stuff still remains.
Yes, ktruss(1) has the problems. Better implementation is expected.
1. If fork()ing, the program is executed twice.
2. If the ktruss(1) output is bufferd, the final output is not flushed
(because it is executing).
% ktrace -f - rm >/dev/null
usage: rm [-dfiPRrW] file ...
usage: rm [-dfiPRrW] file ...
% ktruss date | cat
Fri Jul 23 12:09:45 JST 1999
Fri Jul 23 12:09:46 JST 1999
%