Subject: bin/20048: ktruss exits with error leaving program running
To: None <email@example.com>
From: None <firstname.lastname@example.org>
Date: 01/24/2003 23:00:16
>Synopsis: ktruss exits with error leaving program running
>Arrival-Date: Fri Jan 24 14:58:00 PST 2003
>Originator: David Laight
>Release: NetBSD 1.6M
System: NetBSD snowdrop 1.6M NetBSD 1.6M (GENERIC) #1: Wed Jan 22 10:30:23 GMT 2003 dsl@snowdrop:/oldroot/usr/bsd-current/obj/sys/arch/i386/compile/GENERIC i386
If you ktruss a program that tries to read a sparse file, then
ktruss aborts with the error "ktruss: data too short"
returning you to your shell prompt, but leaving the program
$ echo x >x
$ echo x | dd of=x seek=10240*10240
$ ktruss hexdump x
ktruss: data too short
$ ps | grep hexdump
190170 pa R 0:01.86 hexdump x
Note that ktruss exits but hexdump is still active.
If ktruss does abort tracing it should probably wait for
the traced program to exit.
It probably should also not abort the trace at that point.