Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


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

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



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>



BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org