Am testat si acelasi rezultat. Chestia e ca la mine pe calculator merge perfect..<br><br>Alte idei pls?<br><br>Multumesc, <br><br>Chiritescu Paul Mihai<br><br><div class="gmail_quote">On Sun, Apr 19, 2009 at 9:38 PM, mihai chiritescu <span dir="ltr"><<a href="mailto:mihaichiritescu@gmail.com">mihaichiritescu@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Sal.<br><br>Am urmatoarea problema: clientul nu imi deschide semafoarele cu eroarea: <br><pre>
Client:Semafor open() failed:: No such file or directory<br><br>In server am declarat semafoarele si numele lor:<br> sem_t *sem[BUCKET_COUNT];
<br> char sem_names[BUCKET_COUNT][20];<br>Le-am denumit :<br> for(i=0;i<BUCKET_COUNT;i++){
<br> sprintf(sem_names[i],"/sem%d",i);
<br> }<br>Le-am deschis:<br> for(i=0;i<BUCKET_COUNT;i++){
<br> sem[i] = sem_open(sem_names[i], O_CREAT | O_RDWR, 0777, 1);
<br> if (SEM_FAILED == sem[i]) {
<br> perror("Server:Semafor open() failed:");
<br> exit(-1);
<br> }
<br> }<br><br>In client le-am declarat la fel ca in server si le-am denumit la fel si le-am deschis in felul urmator:<br> for(i=0;i<BUCKET_COUNT;i++){
<br> sem[i] = sem_open(sem_names[i], O_EXCL);
<br> if (SEM_FAILED == sem[i]) {
<br> perror("Client:Semafor open() failed:");
<br> exit(-1);
<br> }
<br> }<br><br>Ce am gresit de nu mi le deschide in client? Stau de mult cu eroarea asta si probabil ca imi scapa mie ceva. Fara semafoare tema merge bine, dar cu semafoare nu.<br><br>Multumesc anticipat, <br><br>Chiritescu Paul Mihai <br>
334CC<br><br><br><br></pre>
</blockquote></div><br>