diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-01-27 12:55:44 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-01-30 11:22:29 +0000 |
commit | 33269e20e6d2e71f68854830183b6afc4fe946a6 (patch) | |
tree | bb2c9418a4d29915c1bfa49ec5307f008a89448b /lib/igt_core.c | |
parent | 4177d0d6a40fe96e3d859be0413bf66ef9a8a606 (diff) |
lib: Skip unused fork helpers
Skip trying to stop unused fork helpers to avoid the various asserts
that they were running and didn't die early.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109468
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Diffstat (limited to 'lib/igt_core.c')
-rw-r--r-- | lib/igt_core.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/igt_core.c b/lib/igt_core.c index 49fbf70d..cbbe79f8 100644 --- a/lib/igt_core.c +++ b/lib/igt_core.c @@ -1671,13 +1671,17 @@ static bool helper_was_alive(struct igt_helper_process *proc, * igt_stop_helper: * @proc: #igt_helper_process structure * - * Terminates a helper process. It is an error to call this on a helper process - * which hasn't been spawned yet. + * Terminates a helper process. It is legal to call this on a helper process + * which hasn't been spawned yet, e.g. if the helper was skipped due to + * HW restrictions. */ void igt_stop_helper(struct igt_helper_process *proc) { int status; + if (!proc->running) /* never even started */ + return; + /* failure here means the pid is already dead and so waiting is safe */ kill(proc->pid, proc->use_SIGKILL ? SIGKILL : SIGTERM); |