[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-wget] [bug #51181] Unexpected "Redirecting output to 'wget-log'."
From: |
Peter Wu |
Subject: |
[Bug-wget] [bug #51181] Unexpected "Redirecting output to 'wget-log'." |
Date: |
Sun, 17 Jun 2018 07:22:34 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0 |
Follow-up Comment #13, bug #51181 (project wget):
I can only reproduce it with fork before execve *and* when using the "timeout"
command:
#include <unistd.h>
#include <stdio.h>
#include <sys/wait.h>
int main() {
char *args[] = {
"timeout", "-k", "26s", "25s",
"wget", "-O", "test.html", "http://example.com", NULL
};
int pid = fork();
if (pid < 0) {
perror("fork");
return 1;
} else if (pid == 0) {
execvp(args[0], args);
perror("execvp");
return 1;
} else {
wait(NULL);
perror("wait");
}
return 0;
}
It appears that "timeout" is creating a new process group:
977 if (foreground_pgrp != -1 && foreground_pgrp != getpgrp ())
(gdb) p foreground_pgrp
$4 = 12905 # pidof wrapper
(gdb) p (int)getpgrp()
$5 = 12906 # pidof timeout
Suggested workarounds:
- Use "timeout --foreground" or,
- Add the "-o-" option to "wget" to force logging to stdout.
Given the special behavior of "timeout", isn't this "working as intended"?
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?51181>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Bug-wget] [bug #51181] Unexpected "Redirecting output to 'wget-log'.", J, 2018/06/15
- [Bug-wget] [bug #51181] Unexpected "Redirecting output to 'wget-log'.", Peter Wu, 2018/06/15
- [Bug-wget] [bug #51181] Unexpected "Redirecting output to 'wget-log'.", J, 2018/06/16
- [Bug-wget] [bug #51181] Unexpected "Redirecting output to 'wget-log'.", Peter Wu, 2018/06/16
- [Bug-wget] [bug #51181] Unexpected "Redirecting output to 'wget-log'.", J, 2018/06/16
- [Bug-wget] [bug #51181] Unexpected "Redirecting output to 'wget-log'.", Tim Ruehsen, 2018/06/16
- [Bug-wget] [bug #51181] Unexpected "Redirecting output to 'wget-log'.", Darshit Shah, 2018/06/16
- [Bug-wget] [bug #51181] Unexpected "Redirecting output to 'wget-log'.",
Peter Wu <=
- [Bug-wget] [bug #51181] Unexpected "Redirecting output to 'wget-log'.", Tim Ruehsen, 2018/06/17
- [Bug-wget] [bug #51181] Unexpected "Redirecting output to 'wget-log'.", J, 2018/06/17