[so] [Tema2][Linux]Deschidere semafoare
Razvan Deaconescu
razvan.deaconescu at cs.pub.ro
Sun Apr 19 22:55:22 EEST 2009
On Sun, 2009-04-19 at 22:46 +0300, mihai chiritescu wrote:
> Nu merge pe site.
>
> In client am asa:
> sem_t *sem[BUCKET_COUNT];
> char sem_names[BUCKET_COUNT][20];
> for(i=0;i<BUCKET_COUNT;i++){
> sprintf(sem_names[i],"/sem%d",i);
> }
> for(i=0;i<BUCKET_COUNT;i++){
> sem[i] = sem_open(sem_names[i], O_RDWR);
> if (SEM_FAILED == sem[i]) {
> perror("Client:Semafor open() failed:");
> exit(-1);
> }
> }
Ce eroare da sem_open in codul client (tot ENOENT - "No such file or
directory")? Ai testat pe masina virtuala?
Razvan
More information about the so
mailing list