Re: redirecting output to a file with g_spawn_async



Colossus wrote:
Hi,

I tried with g_spawn_async_with_pipes and with gspawn_async
but it does not work. In the first case the output (the decompressed
bzip2 file) is redirected to a GTK window so I used g_spawn_async (no pipes) but the output is directed to the shell window from which I ran
my program. How can I have the output redirected to the file /mnt/foo ?

Ehm sorry, I realize I haven't been much clear:

I'm developing a GTK+2 only frontend to the various archivers such as bzip2, gzip,zip. I need to run a command like this: bzip2 -cd /Stuff/pippo.bz2 > /mnt/foo to have the archive .bz2 decompressed in the file /mnt/foo. The problem as I described above is that the output (the decompressed file) does not come in the file /mnt/foo but in shell window from which I run my program. Which tecnique should I use to achieve this goal ?

Thank you,
--
Colossus

Cpsed, a Linux OpenGL 3D scene editor
http://cpsed.sourceforge.net/




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