You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 15, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Jan 15, 2026. It is now read-only.
Invalid PID when trying to kill BackgroundCommand #693
self._process = self._target.background(f"poller -l {','.join([str(x) for x in self._files.keys()])} {' '.join(self._files.values())}", as_root=self._as_root)
When I then try to run:
self._process.cancel()
I see the following error:
Command '/home/appa/devlib-target/bin/busybox kill -15 -329893' returned non-zero exit status 1.
OUTPUT: kill: can't kill pid -329893: No such process
Checking on the device I can see that the PID does exist:
It seems the issue is the preceding -, if I run the command manually without it (/home/appa/devlib-target/bin/busybox kill -15 329893) the process is killed as expected
In case someone has the same idea, this PR #689 does not provide a workaround, since SIGTERM, SIGQUIT and SIGKILL are still handled in the same way as currently.
Activity
[-]Invalid PID wheb trying to kill BackgroundCommand[/-][+]Invalid PID when trying to kill BackgroundCommand[/+]ep1cman commentedon Jun 14, 2024
It seems that when it is being wrapped by sudo, the PID returned is not the PGID.
The PID sent to the kill command in this case was
373748, but you can see the PGID is actually373747which is the the outer sudo calldouglas-raillard-arm commentedon Jul 26, 2024
Interesting, thanks for reporting.
In case someone has the same idea, this PR #689 does not provide a workaround, since SIGTERM, SIGQUIT and SIGKILL are still handled in the same way as currently.