a simple wget in C language?

O

olivier HARO

Hello everybody,

I have a little problem with a littre program i'm writting :


I use the system(char* s) function in my program to retreve an information.
The problem is that when wget in launched and as retrieved the file, my
program stops instatanly....

So I see two possible solutions :
1\ making system() not exiting after executin wget
2\ building a little wget as a function of my program

but I don't know how to do such things ... that's why I'm here ;)

Someone could help me? (sorry for the bad englesh ;) )
 
M

Minti

olivier HARO said:
Hello everybody,

I have a little problem with a littre program i'm writting :


I use the system(char* s) function in my program to retreve an information.
The problem is that when wget in launched and as retrieved the file, my
program stops instatanly....

So I see two possible solutions :
1\ making system() not exiting after executin wget
2\ building a little wget as a function of my program

but I don't know how to do such things ... that's why I'm here ;)

Someone could help me? (sorry for the bad englesh ;) )


Do you mind posting a small working case of your code.


--
Imanpreet Singh Arora
Zmoc.Zliamg@Zteerpnami
Remove Z to mail
"Things may come to those who wait, but only the things left by those who
hustle."
Abraham Lincoln
 
C

CBFalconer

Minti said:
.... snip ...

Do you mind posting a small working case of your code.

No, please don't. wget is off-topic here, as is anything run by
system() (but not the call to system itself). I think you want
comp.unix.programmer (or similar).

Minti has been around here before, and should know better than to
encourage off-topic postings.
 
M

Minti

CBFalconer said:
No, please don't. wget is off-topic here, as is anything run by
system() (but not the call to system itself). I think you want
comp.unix.programmer (or similar).

Minti has been around here before, and should know better than to
encourage off-topic postings.

Thanks, but I just did not want to get to the conclusion straight away that
the problem was caused by @system@.


--
Imanpreet Singh Arora
Zmoc.Zliamg@Zteerpnami
Remove Z to mail
"Things may come to those who wait, but only the things left by those who
hustle."
Abraham Lincoln
 
O

olivier HARO

there is a thing that is nor off-subject :
is there anywere a free C function that I could use to download a web page
from a URL?
 
J

Joona I Palaste

olivier HARO said:
there is a thing that is nor off-subject :
is there anywere a free C function that I could use to download a web page
from a URL?

Not in standard C.

--
/-- Joona Palaste ([email protected]) ------------- Finland --------\
\-------------------------------------------------------- rules! --------/
"'So called' means: 'There is a long explanation for this, but I have no
time to explain it here.'"
- JIPsoft
 
O

olivier HARO

I have found a issue ....
ok, this is a little dirty but it works ;)

when i use a sleep() after the system() ... the program goes on... ;)
in fact, the program don't wait the end of the system() function execution
to continue executing the next lines.
That's why it was bugging....
 
B

Barry Schwarz

I have found a issue ....
ok, this is a little dirty but it works ;)

when i use a sleep() after the system() ... the program goes on... ;)
in fact, the program don't wait the end of the system() function execution
to continue executing the next lines.
That's why it was bugging....

sleep() is not a standard C function either.


<<Remove the del for email>>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top