Re: Getting this to Work
- Posted by Robert Craig <rds at RapidEuphoria.com> Apr 01, 2007
- 541 views
c.k.lester wrote: > Leonardo Cecchi wrote: > > I think the problem is that you have the "-b" option in the wget invocation. > > I removed the -b option and it works!!! I think I had just copied what Rob > posted recently (news.exu) and assumed that was necessary (it puts wget into > the background... whatever that means!). The -b option causes wget to run as an independent process, so your program is not blocked waiting for the download to complete (or a time-out to occur). If your program has nothing better to do than wait, then you shouldn't use -b. You may have had trouble with -b because you can't predict when the file will be created, or when it will contain more than zero bytes. Either event could take a few seconds or more. gets() may report EOF, but if you try it again, gets() might pick up something. It's not really clear when you can assume it's the final, official EOF, unless maybe you know what the last part of the file is supposed to look like, or you assume it must be all done after a certain period of time. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com