Skip to content
Commit f34c4d0f authored by Matheus Castanho's avatar Matheus Castanho Committed by Tulio Magno Quites Machado Filho
Browse files

sunrpc: Properly clean up if tst-udp-timeout fails



The macro TEST_VERIFY_EXIT is used several times on
sunrpc/tst-udp-timeout to exit the test if a condition evaluates to
false. The side effect is that the code to terminate the RPC server
process is not executed when the program calls exit, so that
sub-process stays alive.

This commit registers a clean up function with atexit to kill the
server process before exiting the main program.

Reviewed-by: default avatarTulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
parent 0a8ce6a0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment