Re: [LTP] [PATCH] [RFC] lib: shell: Fix timeout process races

Cyril Hrubis
2021-09-20T12:02:07Z

Hi!
> > Shouldn't this be reused from the library instead of being reimplemented?
>
> I wanted to avoid calling the tst_res() functions to keep things simple,
> but I guess that there is no reason not to use it.

And there actuall was a reason, since we cannot do tst_res(TBROK,
"..."); in the C library.

And looking at the C library, we avoid using the tst_res() on timeouts
as well, actually we just write to stderr because we do that from a
signal handler context. So I guess that we can just print to stderr here
instead.

--
Cyril Hrubis
chrubis@suse.cz