क्या इस कोड का व्यवहार अच्छी तरह से परिभाषित है?क्या यह मुख्य धागे पर pthread_join को कॉल करने के लिए मान्य है?
#include <stdio.h>
#include <pthread.h>
pthread_t mt;
void *start(void *x)
{
void *y;
pthread_join(mt, &y);
printf("joined main thread\n");
return 0;
}
int main()
{
pthread_t t;
mt = pthread_self();
pthread_create(&t, 0, start, 0);
pthread_exit(0);
}
क्या आप अंतिम संपादन के लिए अपने स्रोत में एक लिंक जोड़ने पर विचार करेंगे? मुझे विश्वास है कि आप इसे यहां से प्राप्त कर चुके हैं: http://pubs.opengroup.org/onlinepubs/009695399/functions/exec.html, लेकिन मैं पहले पुष्टि करना चाहता था। महान जवाब, यद्यपि! – currysensei
@currysensei: जोड़ा गया! – psmears