<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div><span>Multumesc pentru raspunsuri, insa nu merge nici asa. Citisem partea in care scria ca dimensiunea bufferului trebuie sa fie >= dimensiunea maxima a mesajului. De aceea am si folosit attr.mq_msgsize + 1. Din cate stiam eu prioritatea poate sa fie si NULL .</span></div><div><br></div>  <div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1">  <b><span style="font-weight:bold;">From:</span></b> Claudiu Olteanu <olteanu.claudiu@ymail.com><br> <b><span style="font-weight: bold;">To:</span></b> "so@cursuri.cs.pub.ro" <so@cursuri.cs.pub.ro> <br> <b><span style="font-weight: bold;">Sent:</span></b> Wednesday, April 10, 2013 2:01 AM<br> <b><span
 style="font-weight: bold;">Subject:</span></b> [Tema 2][linux] mq_receive returneaza Bad file descriptor<br> </font> </div> <br><div id="yiv5661026739"><div><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 10pt;"><div>Salut!</div><div><br></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;">Nu imi dau seama de ce atunci cand incerc sa fac preiau ceva de pe coada imi da Bad file descriptor. Sa pun pe ea nu intampin nicio problema. File descriptorul este identic cu cel intors de mq_open. Aveti idee care ar putea fi problema?</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif;
 background-color: transparent; font-style: normal;">Apelul functiei mele arata ceva de genul :</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;">mq_receive(mq, (char *)msg, attr.mq_msgsize + 1 , NULL);</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;">Multumesc,</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;">Claudiu</div></div></div></div><br><br> </div> </div>  </div></body></html>