Serenity Operating System
at master 27 lines 478 B view raw
1/* 2 * Copyright (c) 2018-2020, the SerenityOS developers. 3 * 4 * SPDX-License-Identifier: BSD-2-Clause 5 */ 6 7#include <pthread.h> 8#include <stdio.h> 9#include <sys/select.h> 10#include <unistd.h> 11 12int main(int, char**) 13{ 14 pthread_t tid; 15 pthread_create( 16 &tid, nullptr, [](void*) -> void* { 17 sleep(1); 18 __builtin_trap(); 19 return nullptr; 20 }, 21 nullptr); 22 23 pthread_join(tid, nullptr); 24 25 printf("ok\n"); 26 return 0; 27}