Bug 1473083 - Running wget without option -b in the background will yield a file 'wget-log'
Running wget without option -b in the background will yield a file 'wget-log'
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: wget (Show other bugs)
26
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Tomáš Hozza
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-19 21:35 EDT by Adri Verhoef
Modified: 2017-08-23 08:28 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-23 07:40:06 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Adri Verhoef 2017-07-19 21:35:31 EDT
Description of problem:
On Fedora 25, running wget (without option -b) in the background doesn't yield a file wget-log, however, since Fedora 26, running wget (without option -b) in the background is 'suddenly' yielding a file wget-log.
According to the manpage, when the option -b is specified and "If no output file is specified via the -o, output is redirected to wget-log."
So, without option -b, the file wget-log should not be created (but now it does on Fedora 26).

Version-Release number of selected component (if applicable):
wget-1.19.1-3.fc26.x86_64

How reproducible:
By running wget in the background without option -b.

Steps to Reproduce:
1. The other way around ...
$ wget -b -q nu.nl
Continuing in background, pid 28969.

[This should create a file wget-log, but it doesn't.  On Fedora 25, it does.
According to the manpage, when the option -b is specified (without option -o), output is redirected to wget-log.]

2.
$ wget -q nu.nl &
[1] 28976

Redirecting output to ‘wget-log’.

[This should not create a file wget-log, for the option -b is lacking, but it does.  On Fedora 25, it doesn't.]

Actual results:
When -b is lacking and wget runs in the background, the file wget-log is created.

Expected results:
When -b is lacking and wget runs in the background, the file wget-log should not be created.

Additional info:
From the manpage:
       -b
       --background
           Go to background immediately after startup.  If no output file is specified via the -o, output is redirected to wget-log.
Comment 1 Tomáš Hozza 2017-08-23 07:40:06 EDT
Hello.

Thank you for your report.

(In reply to Adri Verhoef from comment #0)
> Description of problem:
> On Fedora 25, running wget (without option -b) in the background doesn't
> yield a file wget-log, however, since Fedora 26, running wget (without
> option -b) in the background is 'suddenly' yielding a file wget-log.
> According to the manpage, when the option -b is specified and "If no output
> file is specified via the -o, output is redirected to wget-log."
> So, without option -b, the file wget-log should not be created (but now it
> does on Fedora 26).
> 
> Version-Release number of selected component (if applicable):
> wget-1.19.1-3.fc26.x86_64
> 
> How reproducible:
> By running wget in the background without option -b.
> 
> Steps to Reproduce:
> 1. The other way around ...
> $ wget -b -q nu.nl
> Continuing in background, pid 28969.
> 
> [This should create a file wget-log, but it doesn't.  On Fedora 25, it does.
> According to the manpage, when the option -b is specified (without option
> -o), output is redirected to wget-log.]

I can not reproduce this on Fedora 25. wget-log is not created on F25 nor on F26. The behavior seems to be consistent. If I remove "-q", wget-log is created on both, F25 and F26.

Tested with:
wget-1.18-3.fc25.x86_64
wget-1.19.1-3.fc26.x86_64

> 2.
> $ wget -q nu.nl &
> [1] 28976
> 
> Redirecting output to ‘wget-log’.
> 
> [This should not create a file wget-log, for the option -b is lacking, but
> it does.  On Fedora 25, it doesn't.]

This is expected. In 1.19, wget was enhanced to figure out if it is running in background automatically, so that it does not print any output on STDOUT.

You can find more info in:
http://git.savannah.gnu.org/cgit/wget.git/commit/?id=dd5c549f6af8e1143e1a6ef66725eea4bcd9ad50
https://savannah.gnu.org/bugs/?45790

> Actual results:
> When -b is lacking and wget runs in the background, the file wget-log is
> created.
> 
> Expected results:
> When -b is lacking and wget runs in the background, the file wget-log should
> not be created.
> 
> Additional info:
> From the manpage:
>        -b
>        --background
>            Go to background immediately after startup.  If no output file is
> specified via the -o, output is redirected to wget-log.

The "-b" option says that because wget is explicitly run in background, the output will go into wget-log. It does not say that if wget is run in background without the option, that it won't create wget-log. Since the fact if wget is run in the background is figured out automatically, wget-log is created if needed, without "-b" being specified.
Comment 2 Adri Verhoef 2017-08-23 08:28:12 EDT
OK, so the behaviour has changed, I understand that.  Then this is not the problem I'm running into.  Since the bugreport is closed now and the problem I'm having is when running wget in combination with -O, I'll file a new bugreport.
Comment 3 Adri Verhoef 2017-08-23 08:28:33 EDT
Thanks. :-)

Note You need to log in before you can comment on or make changes to this bug.