Re: glib 1.2 way of doing a tar/find backup?

I would have a look at popen, this is the clasic unix way of doing
something like that. Same as system but returns a c FILE* you read and
write to like a normal file that is connected to the stdin/out of the
command you are executing so you can read the output into your program
and work out progress that sort of thing. Also doesn't block..

man popen

On Thu, 2004-09-09 at 19:52, John Cupitt wrote:
ahem, of course that's "its" not "it's"

On Thu, 9 Sep 2004 09:52:13 +0000, John Cupitt <jcupitt gmail com> wrote:

On Thu, 09 Sep 2004 01:03:08 -0400, Tony Freeman
<tony freeman insightbb com> wrote:
I can tar and gzip the data
really easy into a temp directory using a shell command:

tar -czf /tmp/20040808_backup.tar.gz `find /data/monday -daystart -cmin
+1440 -cmin -2880`

How can I do this in C/glib/gtk =< 1.2?

The easiest is system( "my-shell-command" ); although your interface
will appear to lock up while it does it's work. If you want to stay
live and give feedback, the next easiest is to run the shell command
as a background job (just put an "&" at the end) and poll in a timeout
for completion (in my opinion).

gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
Jared Kells
kared kared net

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