1 /* 2 * Copyright (c) 2002, Intel Corporation. All rights reserved. 3 * Created by: salwan.searty REMOVE-THIS AT intel DOT com 4 * This file is licensed under the GPL license. For the full content 5 * of this license, see the COPYING file at the top level of this 6 * source tree. 7 8 * Test that when the null signal is sent to pthread_kill(), error 9 checking is still performed. 10 */ 11 12 #include <pthread.h> 13 #include <signal.h> 14 #include <stdio.h> 15 #include <stdlib.h> 16 #include <unistd.h> 17 #include <errno.h> 18 #include <sys/types.h> 19 #include "posixtest.h" 20 21 int main(void) 22 { 23 pthread_t main_thread; 24 25 main_thread = pthread_self(); 26 27 if (EINVAL != pthread_kill(main_thread, -1)) { 28 printf("pthread_kill() did not fail on EINVAL\n"); 29 return PTS_FAIL; 30 } 31 32 return PTS_PASS; 33 } 34