mirror of
https://github.com/ish-app/ish.git
synced 2026-01-18 13:57:29 +00:00
16 lines
282 B
C
16 lines
282 B
C
#include <stdio.h>
|
|
#include <pthread.h>
|
|
|
|
void *thread(void *data) {
|
|
printf("thread\n");
|
|
return data;
|
|
}
|
|
|
|
int main() {
|
|
pthread_t t;
|
|
printf("main before create\n");
|
|
pthread_create(&t, NULL, thread, NULL);
|
|
pthread_detach(t);
|
|
printf("main after create\n");
|
|
}
|