Rather than just the parent `pid`, also monitor the thread states via the `proc` subdirectories: `/proc/<pid>/task/<tid>`