Re: redirecting output to a file with g_spawn_async

Andreas Stricker wrote:

Come on, read this code carefully: If you assume that you alway extract
text-only data, it's ok. But in all other case, you read in a line
and write the data from line buffer start to the first including null
byte to fd. That is really not what you want.

Use a not text file base read methode like g_io_channel_read_chars()
then read into a fixed size buffer and write all read bytes into the
final file.

Thanks a lot, I succeded using g_io_channel_read_chars. I really appreciated your kind help. I'll mention in the about window of
my gtk2 only frontend this list. Without theirs members I would never
release xarchiver.


Cpsed, a Linux OpenGL 3D scene editor

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