I am using pth 1.4.0 on Sco openserver 5.0.4 .pth_init() and
pth_spwan returns error number 4 which is EINTR.I have no clue why this is
happening.I am including my sample program .
        I would highly appreciate any confirmation or explanation about
this.
Thanks in advance
Sanjay
Here goes the program ====>

#include <stdio.h>
#include <pth.h>
#include <stdlib.h>
 
void *clientThread(void *param);
 
int
main() {
    pth_t       hThread;
    int         value = 0;
    int         *valuePtr;

    valuePtr = (int *)malloc(sizeof(int));
    if (valuePtr == NULL) {
        perror("malloc return");
        exit(1);
    }
    valuePtr = &value;
 
    if (pth_init() != 0) {
        perror("pth_init returned");
        exit(1);
    }
 
    printf("In main\n");
 
    if ((hThread=pth_spawn(PTH_ATTR_DEFAULT, clientThread, 0)) != 0)
    {
        perror("pth_spawn returned");
        exit(1);
    }
 
    printf("Before join\n");
 
    if (pth_join(hThread, (void **)&valuePtr) == FALSE) 
    {
        perror("pth_join returned");
        exit(1);
    }
 
    printf("In main, after pth ran.\n");
 
    if (pth_kill() == FALSE) {
        perror("pth_kill returned");
        exit(1);
    }
    return 0;
}
 
void * clientThread(void *param) {
    printf("In thread\n");
    return 0;
}
______________________________________________________________________
GNU Portable Threads (Pth)            http://www.gnu.org/software/pth/
User Support Mailing List                            [EMAIL PROTECTED]
Automated List Manager (Majordomo)           [EMAIL PROTECTED]

Reply via email to