Re: Implementing "cpio -tv < file.cpio" with glib routines
- From: Olivier Sessink <lists olivier pk wau nl>
- To: Colossus <colossus 3000 it>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Implementing "cpio -tv < file.cpio" with glib routines
- Date: Fri, 14 Oct 2005 16:15:38 +0200
Colossus wrote:
Hi,
How can I code with g_spawn_* glib routines the command in the subject
line ? Alternatively I noticed that
"cat file.cpio | cpio -tv" also works but how to implement also this
with g_spawn family ?
1) spawn 'cpio -tv' with a pipe in and a pipe out
2) create non-blocking g_io_channels from these pipes
3) register callbacks with g_io_add_watch() for the io channels, one of
these functions should write, the other one read
you might want to look at 'external_commands.c' from the Bluefish source
code, it can process data through external commands, using pipes, fifo's
or temporary files.
regards,
Olivier
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]