Open nj00001 opened 7 months ago
I ran into this as well. I wanted to suspend a program and attach Frida to it. Raising a SIGSTOP indeed didn't allow Frida to attach to it.
For my use case, I solved this by instead doing read
from a fd (e.g. a FIFO file). This blocks the calling thread until it reads the input. This allowed me to attach Frida to the process and let it resume when I want by writing to that FIFO file (unblocking the thread).
Check out the code example below
When a process receives a SIGSTOP signal, it enters a suspended state, and if you use frida to inject into the process, the js code injected into the process does not seem to be executed. If you add a sleep function to the end of the above code, then you will receive
Unexpectedly timed out while waiting for signal from process with PID 23551