Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > a simple wget in C language?

Reply
Thread Tools

a simple wget in C language?

 
 
olivier HARO
Guest
Posts: n/a
 
      10-14-2004
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 )


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.775 / Virus Database: 522 - Release Date: 08/10/2004


 
Reply With Quote
 
 
 
 
Minti
Guest
Posts: n/a
 
      10-14-2004
"olivier HARO" <(E-Mail Removed)> wrote in message
news:416ea206$0$11919$(E-Mail Removed)...
> 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


 
Reply With Quote
 
 
 
 
CBFalconer
Guest
Posts: n/a
 
      10-14-2004
Minti wrote:
> "olivier HARO" <(E-Mail Removed)> wrote in message
>>
>> 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....

.... 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.

--
Chuck F ((E-Mail Removed)) ((E-Mail Removed))
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!


 
Reply With Quote
 
Minti
Guest
Posts: n/a
 
      10-14-2004


"CBFalconer" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Minti wrote:
> > "olivier HARO" <(E-Mail Removed)> wrote in message
> >>
> >> 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....

> ... 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.
>


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


 
Reply With Quote
 
olivier HARO
Guest
Posts: n/a
 
      10-15-2004
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?


"Minti" <(E-Mail Removed)> a écrit dans le message de
news:(E-Mail Removed)...
>
>
> "CBFalconer" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Minti wrote:
> > > "olivier HARO" <(E-Mail Removed)> wrote in message
> > >>
> > >> 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....

> > ... 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.
> >

>
> 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
>
>



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.775 / Virus Database: 522 - Release Date: 08/10/2004


 
Reply With Quote
 
Joona I Palaste
Guest
Posts: n/a
 
      10-15-2004
olivier HARO <(E-Mail Removed)> scribbled the following:
> 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 ((E-Mail Removed)) ------------- Finland --------\
\-------------------------------------------------------- rules! --------/
"'So called' means: 'There is a long explanation for this, but I have no
time to explain it here.'"
- JIPsoft
 
Reply With Quote
 
olivier HARO
Guest
Posts: n/a
 
      10-15-2004
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....



"Joona I Palaste" <(E-Mail Removed)> a écrit dans le message de
news:cknv0q$fun$(E-Mail Removed)...
> olivier HARO <(E-Mail Removed)> scribbled the following:
> > 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 ((E-Mail Removed)) ------------- Finland --------\
> \-------------------------------------------------------- rules! --------/
> "'So called' means: 'There is a long explanation for this, but I have no
> time to explain it here.'"
> - JIPsoft



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.775 / Virus Database: 522 - Release Date: 08/10/2004


 
Reply With Quote
 
Barry Schwarz
Guest
Posts: n/a
 
      10-15-2004
On Fri, 15 Oct 2004 10:32:46 +0200, "olivier HARO"
<(E-Mail Removed)> wrote:

>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>>
 
Reply With Quote
 
Minti
Guest
Posts: n/a
 
      10-15-2004

I think now I know what Chuck meant. BTW please don't toppost its for
assholes.


--
Imanpreet Singh Arora
Zmoc.Zliamg@Zteerpnami
Remove Z to mail



"olivier HARO" <(E-Mail Removed)> wrote in message
news:416f7e27$0$86539$(E-Mail Removed)...
> 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?
>
>
> "Minti" <(E-Mail Removed)> a écrit dans le message de
> news:(E-Mail Removed)...
> >
> >
> > "CBFalconer" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > Minti wrote:
> > > > "olivier HARO" <(E-Mail Removed)> wrote in message
> > > >>
> > > >> 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....
> > > ... 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.
> > >

> >
> > 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
> >
> >

>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.775 / Virus Database: 522 - Release Date: 08/10/2004
>
>



 
Reply With Quote
 
Joona I Palaste
Guest
Posts: n/a
 
      10-15-2004
Minti <(E-Mail Removed)> scribbled the following:
> I think now I know what Chuck meant. BTW please don't toppost its for
> assholes.


Heh heh.

--
/-- Joona Palaste ((E-Mail Removed)) ------------- Finland --------\
\-------------------------------------------------------- rules! --------/
"To know me IS to love me."
- JIPsoft
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
lwp::simple get (why it would stop working along with wget when fetch still works) rockerd@gmail.com Perl Misc 2 07-21-2007 11:26 AM
lwp::simple get (why it would stop working along with wget when fetch still works) rockerd@gmail.com Perl Misc 0 07-18-2007 02:17 AM
wget , how do I download when links are to a php .. ? jameshanley39@yahoo.co.uk Computer Information 0 01-04-2007 02:51 PM
looking for wget-like module for getching software Robert P. J. Day Python 2 12-16-2004 04:43 PM
WGET Henry Computer Security 1 08-11-2004 06:15 AM



Advertisments