benfred / remoteprocess

Cross platform process information in Rust
MIT License
56 stars 29 forks source link

Handle SIGTSTP in linux threadlock #94

Closed benfred closed 1 month ago

benfred commented 1 month ago

If the a process was already stopped (for instance by hitting control-z), we used to be able to still treat it as locked - but with recent changes to use ptrace seize/interrupt, this no longer worked.

Fix by handling SIGTSTP.

benfred commented 1 month ago

@andrewjcg this is a slight tweak to https://github.com/benfred/remoteprocess/pull/83 - I noticed I couldn't profile processes I suspended using control-z with py-spy with the latest changes, and this seems to resolve .

lmk what you think - I'm trying to get a new release of this crate out in the next little bit, since I also want to push out a new py-spy version with python3.12/3.13 support

andrewjcg commented 1 month ago

LGTM!