Hello, I'm trying to port RPL/2 (http://www.rpl2.net) to OS/2 and I don't understand OS/2 semget(). RPL/2 uses POSIX semaphores. I have written a minimal library that emulates POSIX semaphores with SysV ones. I have tested this library on several Unix systems without any trouble. On OS/2, semget() always returns -1 and I don't understand my mistake. int sem_init_SysV(sem_t *semaphore, int shared, unsigned int valeur) { int ios; union semun argument; if (shared != 0) { return(ENOSYS); } (*semaphore) = semget(IPC_PRIVATE, 1, IPC_CREAT | IPC_EXCL | SEM_R | SEM_A); if ((*semaphore) == -1) { // Always true with OS/2 (libc 0.6.3) return(EINVAL); } argument.val = valeur; ios = semctl((*semaphore), 0, SETVAL, argument); return(ios); } Any explanation ? Thanks in advance, JKB
BERTRAND Joel dixit:> Hello, > > I'm trying to port RPL/2 (http://www.rpl2.net) to OS/2 and I don'tI think you?re on the wrong list ? http://en.wikipedia.org/wiki/Klibc#Other_klibc bye, //mirabilos -- Support mksh as /bin/sh and RoQA dash NOW! ? src:bash (232 (249) bugs: 0 RC, 176 (190) I&N, 56 (59) M&W, 0 F&P) ? src:dash (65 (73) bugs: 3 (7) RC, 45 (49) I&N, 15 M&W, 2 F&P) ? src:mksh (2 bugs: 0 RC, 0 I&N, 2 M&W, 0 F&P)