Re: non-blocking file access
- From: Harring Figueiredo <harringf yahoo com>
- To: Paul Pogonyshev <pogonyshev gmx net>, gtk-app-devel-list gnome org
- Subject: Re: non-blocking file access
- Date: Mon, 9 Feb 2004 08:05:22 -0800 (PST)
http://developer.gnome.org/doc/API/2.0/glib/glib-IO-Channels.html
Harring
--- Paul Pogonyshev <pogonyshev gmx net> wrote:
Hi.
I need to watch several files (pipes) and read information from them
in a GUI program. My main target platform is GNU/Linux, but I'd prefer
to do it as platform-independent as possible (probably hiding platform-
dependent functions in GLib). GLib provides a way to portably create
processes and pipes to them, so this part is solvable nicely.
The next part is performing non-blocking and efficient reading from
the pipes. As I have understood, GLib provides a way to watch file
descriptors for new data with custom event sources. However, I was
unable to determine if it is possible to read all available data from a
pipe with GLib (or with ANSI C file/stream access functions).
So, can anyone point me to a way of implementing this efficiently and
using as few platform-specific functions as possible? GLib + ANSI C
functions are preferable, any other portable functions are the next to
best choice. If you can give me just basic ideas, that's fine, I'm sure
I can do without sample code :)
I'd also like to know if a write operation to a pipe can block.
Thanks in advance.
Paul
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]