Re: Threads/IPC/???



Ed Kutrzyba wrote:
I am developing an application that controls a "Data  Collection
System".  I used glade and anjuta for my GUI and C backend control coding.
 My program works great, but I need to add some extra backround tasks:

1) I need to run a script (perl or bash) on demand without interfering
with my program.  i.e. the script runs in the background so GTK is still
responsive.

This should be what you're looking for:
http://developer.gnome.org/doc/API/2.0/glib/glib-Spawning-Processes.html#g-spawn-async

2) I need to spawn a task to perform some background operations.  i.e.
get time from an add in board, arm and disarm an interrupt routine that
time tags an external signal -- need to start and stop this on demand.

On linux, usually we implement hardware abstraction at the kernel
module level, so your interrupt handleing stuff should usually
not be in user-space; assuming this is all setup; you can interface
with a kernel driver's file desctiptor like any other; check
for read/write conditions with GIOChannel/GIOWatch.

Cheers,
                          -Tristan



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]