bugGNU Wget - Bugs: bug #40426, wget hangs with -r and -O -


bug #40426: wget hangs with -r and -O -

Submitted by:  None
Submitted on:  Wed 30 Oct 2013 11:51:48 AM UTC  
Category: Crash/Freeze/InfloopSeverity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Privacy: PublicAssigned to: None
Originator Name: AntonioOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 1.13.4
Operating System: NoneReproducibility: Every Time
Fixed Release: NonePlanned Release: None
Regression: NoneWork Required: None
Patch Included: No

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Wed 09 Sep 2015 07:36:51 AM UTC, comment #3:

Well, it has been 'fixed' by not allowing -r in combination with -O- in wget1.x.

Wget2 already works with -r -O-.

Tim Ruehsen <rockdaboot>
Project Administrator
Tue 08 Sep 2015 07:20:32 AM UTC, comment #2:

This was eventually merged on 2015-08-15, commit 12bae50b28fa20f9ffa3d5b0e88f4ebf51fa6864.

Please, check whether the issue is effectively fixed, and close this.

Ander Juaristi <ajuaristi>
Sat 14 Mar 2015 05:19:43 PM UTC, comment #1:

I thought this is still a valid bug and wrote my patch. I'm surprised to find Calore's patch in attached files and that patch is finished in Nov 2013!
Anyway, my patch is easier to am.

Lucas Yu <lucasyu>
Wed 30 Oct 2013 11:51:48 AM UTC, original submission:

# wget -r -O - http://www.blankwebsite.com

hangs forever, I can verify it with a strace. If I do this:

while read R
wget -r -O - http://www.blankwebsite.com
done < smallfile
with smallfile containing a single line, the command exits in a few seconds.

I tried also with

wget -r -O - localhost/test.html
with an empty test.html file, same results.

Everything runs fine changing -O - with -O myfile or removing -r.

Asked on stackoverflow:



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #33344:  Fix-hang-with-r-O-.patch added by lucasyu (764B - application/octet-stream - Fix this by simply forbidding -r -O- combination)
file #29593:  wget-gitpatch-recursivecheck.diff added by None (948B - application/octet-stream - Patch attached that will check the "-r -O FILE" combination and only allow it if FILE is a regular file.)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by rockdaboot (Posted a comment)
  • -unavailable- added by ajuaristi (Posted a comment)
  • -unavailable- added by lucasyu (Updated the item)

    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 16 Sep 2015 06:40:19 PM UTCrockdabootStatusNone=>Fixed
    Sat 14 Mar 2015 05:07:31 PM UTClucasyuAttached File-=>Added Fix-hang-with-r-O-.patch, #33344
    Mon 11 Nov 2013 04:23:53 PM UTCNoneAttached File-=>Added wget-gitpatch-recursivecheck.diff, #29593

    Back to the top

    Powered by Savane 3.1-cleanup