linux: wait for process before detach, and send SIGCONT
#1
Merged
jan
merged 1 commits from XeroOl/mem_edit:master
into master
2 years ago
Loading…
Reference in New Issue
There is no content yet.
Delete Branch 'XeroOl/mem_edit:master'
Deleting a branch is permanent. It CANNOT be undone. Continue?
Every once in a while, the ptrace call would fail because the process
has not yet stopped from SIGSTOP. From this stackoverflow answer, it
seems that you can use waitpid to wait until the process is actually
stopped. In python, this is exposed as os.waitpid.
https://stackoverflow.com/questions/20510300/ptrace-detach-fails-after-ptrace-cont-with-errno-esrch#20525326
Additionally, the process was left frozen. Sending a SIGCONT tells
the process to continue, undoing the effect of SIGSTOP. This means
that the process isn't frozen when detached.
d49555ad15
into master 2 years agoThank you for the fix and explanation!
d49555ad15
.Step 1:
From your project repository, check out a new branch and test the changes.Step 2:
Merge the changes and update on Gitea.