Message ID | 20190130095500.23596-1-chris@chris-wilson.co.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [i-g-t,1/8] lib: Skip unused fork helpers | expand |
Chris Wilson <chris@chris-wilson.co.uk> writes: > 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> > --- > lib/igt_core.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/lib/igt_core.c b/lib/igt_core.c > index 49fbf70de..0794e11a0 100644 > --- a/lib/igt_core.c > +++ b/lib/igt_core.c > @@ -1678,6 +1678,9 @@ void igt_stop_helper(struct igt_helper_process *proc) > { > int status; > > + if (!proc->running) /* never even started */ > + return; > + The comment above mentions that it is error to call this on a helper process which hasn't been spawned yet. So as we relax the requirements, remove that comment. With that, Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> > /* failure here means the pid is already dead and so waiting is safe */ > kill(proc->pid, proc->use_SIGKILL ? SIGKILL : SIGTERM); > > -- > 2.20.1 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff --git a/lib/igt_core.c b/lib/igt_core.c index 49fbf70de..0794e11a0 100644 --- a/lib/igt_core.c +++ b/lib/igt_core.c @@ -1678,6 +1678,9 @@ 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);
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> --- lib/igt_core.c | 3 +++ 1 file changed, 3 insertions(+)