Perform other functions while untarring file using "system" command in a C program

zoqix zoqix at yahoo.com
Wed Jan 31 04:07:01 EST 2001


Hi all, 
I'm using the "system" command to do an untarring of a file.tar.gz file in my C program. However, I would like to display some status information like "10 % Completed". I've written some code to calculate the percentage. However, the code could only be runned after the "system" command finished untarring my zipped file. e.g. 

system("tar zxf file.tar.gz");
do
{
printf("%d %% Completed", percent);
}while (!finished) 

Therefore, the printf will always print 100 % Completed. Is there any way to let the unzipping continue at background and return to print the completion status? 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.blu.org/pipermail/discuss/attachments/20010131/7139469f/attachment.html>


More information about the Discuss mailing list