Re: [PATCH] kill all threadapply processes at end of test

Tom Tromey
2021-05-13T15:44:57Z

>>>>> "Carl" == Carl Love via Gdb-patches <gdb-patches@sourceware.org> writes:

Carl> +# Make sure all of the threadapply processes are terminated
Carl> +set data [exec ps -e | grep threadapply]

This seems like an issue in a few ways. 'ps' arguments may differ by
platform. Other programs might be called 'threadapply' (unlikely for
user stuff but suppose I'm running 2 gdb test suites at the same time).
It doesn't handle cross-host testing (I don't know if we care about that
any more but in the past it was an issue).

So, I wonder if there's a better way to do this.
Like, could the test track PIDs itself? Then maybe re-attach?

thanks,
Tom