Read Line From Pipe
- From: inbox_pub earthlink net
- To: gtkmm-list gnome org
- Subject: Read Line From Pipe
- Date: Sun, 30 Aug 2009 12:59:09 -0500
I have written an application that I compile with:
`pkg-config libgnomedbmm-3.0 --cflags --libs`
The test that I am using right now is this:
-Make selections from radio buttons and check boxes, and
when the Accept button is clicked, write information to the pipe.
-The pipes simply loop and are read in by the Gtkmm read_line().
-Lets say that the information is "button1\nbutton2\nbutton3\n"
-I know that the three lines are getting to the Gtkmm signal to
call my read pipe routine.
-I display in a Gtkmm window what is read with the read_line().
-When I click the Accept button:
First: "button1\n"
Second: "button2\nbutton3\nbutton1\nbutton2\n"
Third: "button3\nbutton1\nbutton2\n"
In my second test, I individually write the information for each
button with a sleep(1) between them. I get:
First: "button1\n"
Second: "button2\nbutton3\nbutton1\n"
Third: "button2\nbutton3\nbutton1\n"
I flush the write pipe after every write. All pipes are configured
non-blocking.
My read function is basically that shown in the Gtkmm MonitorIO chapter.
Is this normal behavior?
Or is there something going on that I don't know?
Thank you.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]