From 94b1ba5aedfff76a9b42721e5109679ac9d417e2 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 13 May 2016 14:59:31 +0200 Subject: posix: Fix return status of pthread_cancel() POSIX recommends ESRCH in case no thread exists for the specified identifier. Update #2713. --- testsuites/psxtests/psxcancel/init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'testsuites') diff --git a/testsuites/psxtests/psxcancel/init.c b/testsuites/psxtests/psxcancel/init.c index c8c96b556c..dba26b91f6 100644 --- a/testsuites/psxtests/psxcancel/init.c +++ b/testsuites/psxtests/psxcancel/init.c @@ -101,9 +101,9 @@ void *countTaskAsync(void *ignored) sc = pthread_setcanceltype(12, &old); fatal_posix_service_status( sc, EINVAL, "cancel type EINVAL" ); - puts( "Init - pthread_cancel - bad ID - EINVAL" ); + puts( "Init - pthread_cancel - bad ID - ESRCH" ); sc = pthread_cancel(0x100); - fatal_posix_service_status( sc, EINVAL, "cancel bad Id" ); + fatal_posix_service_status( sc, ESRCH, "cancel bad Id" ); /* Start countTask deferred */ { -- cgit v1.2.3