[so] [So][Tema1][Windows] Asteptare scriere in pipe
David Cristian
david.cristian1987 at gmail.com
Sun Apr 5 22:54:25 EEST 2009
Fiecare proces din pipe are o structura :
typedef struct
{
HANDLE hStdOUT_Rd;
HANDLE hStdOUT_Wr;
HANDLE hStdIN_Rd;
HANDLE hStdIN_Wr;
}Pipe;
Daca am A | B, A are stdout : hStdOUT_Wr si B are stdin: hStdIN_Rd.
Am setat sa fie inheritable doar hStdOUT_Wr pt A si hStdIN_Rd pentru B.
Procesul tata citeste din hStdOUT_Rd al lui A si scie in hStdIN_Wr.
Poate e o abordare gresita, dar as vrea sa vad cum s-ar putea solutiona
(de ce merge daca pun breakpoint si daca rulez normal nu).
Banuiesc ca nu se termina de scris in pipe inainte de a se incerca citirea.
Nu am gasit pe msdn o metoda prin care sa astept scrierea in pipe.
Multumesc,
David
2009/4/5 Razvan Deaconescu <razvan.deaconescu at cs.pub.ro>
> On Sun, 2009-04-05 at 22:11 +0300, David Cristian wrote:
> > Salut.
> >
> > Am o problema la implementarea pipe-urilor pe Windows.
> > Am ales sa scriu/citesc din procesul tata din/in cele doua pipe-uri.
>
> Cum vine asta?
>
> Razvan
>
> _______________________________________________
> so mailing list
> so at cursuri.cs.pub.ro
> http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/so
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cursuri.cs.pub.ro/pipermail/so/attachments/20090405/1b7c2e6f/attachment.htm>
More information about the so
mailing list