[LTP] [PATCH 6/8] waitpid12: use the new API

Cyril Hrubis chrubis@suse.cz
Mon Jul 18 17:07:41 CEST 2016


Hi!
And I guess that this test can be simplified quite a lot, there is no
reason for checking that pids could be waited for by process group etc.
We only care about the WNOHANG here (since the rest of the code is
nearly identical to waitpid11.c).

All that needs to be done here is to fork some number of children in a
test setup and let them sleep (I would use pause() for simplicity). Then
the whole test would be just a call to waitpid() with WNOHANG and the
test cleanup would send a signal to the test childrens and then wait for
them.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list