[Bug-wget] [bug #45790] wget prints it's progress even when background

2016-10-21 Thread Tim Ruehsen
Update of bug #45790 (project wget):

  Status:None => Fixed  
 Open/Closed:Open => Closed 


___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/




Re: [Bug-wget] bug #45790: wget prints it's progress even when background

2016-09-29 Thread Dale R. Worley
Piotr  writes:
> I would like to avoid forcing users to hack like this ;).
> Wget should print to std* when in fg and print to wget.log when in bg, no 
> matter how user gets there.
> I don't think getpgrp() == tcgetpgrp(STDOUT_FILENO) is heavy and should 
> probaby be ok to check it when printing lines.

That makes sense, though I'd be careful to check for errors returned
from tcgetpgrp().

Dale



Re: [Bug-wget] bug #45790: wget prints it's progress even when background

2016-09-28 Thread Piotr
I would like to avoid forcing users to hack like this ;).
Wget should print to std* when in fg and print to wget.log when in bg, no 
matter how user gets there.
I don't think getpgrp() == tcgetpgrp(STDOUT_FILENO) is heavy and should probaby 
be ok to check it when printing lines.

Piotr

28 wrz 2016 17:47 wor...@alum.mit.edu napisał(a): > > "Wajda, Piotr" writes: > 
> The case with stopping wget is obvious. CTRL+Z and bg should make wget > > 
write to file and I can catch bg with SIGCONT. > > But I wonder what to do when 
after CTRL+Z and bg, user runs fg. In this > > case there's no signal between 
bg anf fg, > > Though the user could, instead of just "fg", do "fg", then 
Ctrl-Z, then > "fg" again.  The second "fg" would cause a SIGCONT, and wget 
could at > that point theck that it had been foregrounded.  Not elegant, but 
fairly > simple. > > Dale

Re: [Bug-wget] bug #45790: wget prints it's progress even when background

2016-09-28 Thread Dale R. Worley
"Wajda, Piotr"  writes:
> The case with stopping wget is obvious. CTRL+Z and bg should make wget 
> write to file and I can catch bg with SIGCONT.
> But I wonder what to do when after CTRL+Z and bg, user runs fg. In this 
> case there's no signal between bg anf fg,

Though the user could, instead of just "fg", do "fg", then Ctrl-Z, then
"fg" again.  The second "fg" would cause a SIGCONT, and wget could at
that point theck that it had been foregrounded.  Not elegant, but fairly
simple.

Dale



Re: [Bug-wget] bug #45790: wget prints it's progress even when background

2016-09-27 Thread Wajda, Piotr

Hi,
The case with stopping wget is obvious. CTRL+Z and bg should make wget 
write to file and I can catch bg with SIGCONT.
But I wonder what to do when after CTRL+Z and bg, user runs fg. In this 
case there's no signal between bg anf fg, and I can only check for 
getpgrp() == tcgetpgrp(STDOUT_FILENO) in e.g. check_redirect_output(), 
right?
In other words, is there better approach than checking getpgrp() == 
tcgetpgrp(STDOUT_FILENO) before printing every line?


Thanks
Piotr

On 19/09/16 19:30, Darshit Shah wrote:

Hi Piotr,

The patch looks fine. However, when Wget is foregrounded again, the
progress bar remains invisible. When the process is foregrounded again,
you should undo the effects of `redirect_output_signal()`

* pwa...@gmail.net.pl  [160919 18:01]:

Hi Darshit,
Sorry for pasting patch into email incorrectly. I've send 2 other
patches before, but as attachments, so they should be fine.

Thanks
Piotr

W dniu 19.09.2016 o 17:28, Darshit Shah pisze:

Hi Piotr,

Thanks for your interest in Wget. I shall review your patch soon.
However, for future reference please do not send patches that are
pasted into the mail like this. It makes it extremely difficult for
us to apply the patch. I was unable to apply the provided diff after
simply saving your email.
Either use `git format-patch` to create a patch file that you attach
to the emails, or use `git send-email` to correctly send an inline diff.

* pwa...@gmail.net.pl  [160918 18:41]:

Hi,
I've implemented fix for bug #45790. Basically I used approach Noel
showed in comment.
Please check below diff if it's sane.

diff --git a/src/main.c b/src/main.c
index ac6ee2c..f324253 100644
--- a/src/main.c
+++ b/src/main.c
@@ -113,7 +113,7 @@ int numurls = 0;
  setting up gettext's message catalog using bindtextdomain and
  textdomain.  Does nothing if NLS is disabled or missing.  */

-#if defined(SIGHUP) || defined(SIGUSR1)
+#if defined(SIGHUP) || defined(SIGUSR1) || defined(SIGCONT)
/* Hangup signal handler.  When wget receives SIGHUP or SIGUSR1, it
  will proceed operation as usual, trying to write into a log file.
  If that is impossible, the output will be turned off.  */
@@ -131,12 +131,20 @@ redirect_output_signal (int sig)
 if (sig == SIGUSR1)
   signal_name = "SIGUSR1";
#endif
+#ifdef SIGCONT
+  if(sig == SIGCONT) {
+/* If process goes to foreground, don't redirect output */
+if(getpgrp() == tcgetpgrp(STDOUT_FILENO))
+  return;
+signal_name = "SIGCONT";
+  }
+#endif

 log_request_redirect_output (signal_name);
 progress_schedule_redirect ();
 signal (sig, redirect_output_signal);
}
-#endif /* defined(SIGHUP) || defined(SIGUSR1) */
+#endif /* defined(SIGHUP) || defined(SIGUSR1) || defined(SIGCONT)*/

static void
i18n_initialize (void)
@@ -2003,6 +2011,9 @@ only if outputting to a regular file.\n"));
#ifdef SIGUSR1
 signal (SIGUSR1, redirect_output_signal);
#endif
+#ifdef SIGCONT
+  signal (SIGCONT, redirect_output_signal);
+#endif
#ifdef SIGPIPE
 /* Writing to a closed socket normally signals SIGPIPE, and the
process exits.  What we want is to ignore SIGPIPE and just check

Thanks
Piotr











Re: [Bug-wget] bug #45790: wget prints it's progress even when background

2016-09-19 Thread Darshit Shah

Hi Piotr,

The patch looks fine. However, when Wget is foregrounded again, the 
progress bar remains invisible. When the process is foregrounded again, 
you should undo the effects of `redirect_output_signal()`


* pwa...@gmail.net.pl  [160919 18:01]:

Hi Darshit,
Sorry for pasting patch into email incorrectly. I've send 2 other 
patches before, but as attachments, so they should be fine.


Thanks
Piotr

W dniu 19.09.2016 o 17:28, Darshit Shah pisze:

Hi Piotr,

Thanks for your interest in Wget. I shall review your patch soon. 
However, for future reference please do not send patches that are 
pasted into the mail like this. It makes it extremely difficult for 
us to apply the patch. I was unable to apply the provided diff after 
simply saving your email.
Either use `git format-patch` to create a patch file that you attach 
to the emails, or use `git send-email` to correctly send an inline 
diff.


* pwa...@gmail.net.pl  [160918 18:41]:

Hi,
I've implemented fix for bug #45790. Basically I used approach 
Noel showed in comment.

Please check below diff if it's sane.

diff --git a/src/main.c b/src/main.c
index ac6ee2c..f324253 100644
--- a/src/main.c
+++ b/src/main.c
@@ -113,7 +113,7 @@ int numurls = 0;
  setting up gettext's message catalog using bindtextdomain and
  textdomain.  Does nothing if NLS is disabled or missing.  */

-#if defined(SIGHUP) || defined(SIGUSR1)
+#if defined(SIGHUP) || defined(SIGUSR1) || defined(SIGCONT)
/* Hangup signal handler.  When wget receives SIGHUP or SIGUSR1, it
  will proceed operation as usual, trying to write into a log file.
  If that is impossible, the output will be turned off.  */
@@ -131,12 +131,20 @@ redirect_output_signal (int sig)
 if (sig == SIGUSR1)
   signal_name = "SIGUSR1";
#endif
+#ifdef SIGCONT
+  if(sig == SIGCONT) {
+/* If process goes to foreground, don't redirect output */
+if(getpgrp() == tcgetpgrp(STDOUT_FILENO))
+  return;
+signal_name = "SIGCONT";
+  }
+#endif

 log_request_redirect_output (signal_name);
 progress_schedule_redirect ();
 signal (sig, redirect_output_signal);
}
-#endif /* defined(SIGHUP) || defined(SIGUSR1) */
+#endif /* defined(SIGHUP) || defined(SIGUSR1) || defined(SIGCONT)*/

static void
i18n_initialize (void)
@@ -2003,6 +2011,9 @@ only if outputting to a regular file.\n"));
#ifdef SIGUSR1
 signal (SIGUSR1, redirect_output_signal);
#endif
+#ifdef SIGCONT
+  signal (SIGCONT, redirect_output_signal);
+#endif
#ifdef SIGPIPE
 /* Writing to a closed socket normally signals SIGPIPE, and the
process exits.  What we want is to ignore SIGPIPE and just check

Thanks
Piotr







--
Thanking You,
Darshit Shah
PGP Fingerprint: 7845 120B 07CB D8D6 ECE5 FF2B 2A17 43ED A91A 35B6


signature.asc
Description: PGP signature


Re: [Bug-wget] bug #45790: wget prints it's progress even when background

2016-09-19 Thread pwa...@gmail.net.pl

Ok, I'll fix that.

Thanks
Piotr

W dniu 19.09.2016 o 19:30, Darshit Shah pisze:

Hi Piotr,

The patch looks fine. However, when Wget is foregrounded again, the 
progress bar remains invisible. When the process is foregrounded 
again, you should undo the effects of `redirect_output_signal()`


* pwa...@gmail.net.pl  [160919 18:01]:

Hi Darshit,
Sorry for pasting patch into email incorrectly. I've send 2 other 
patches before, but as attachments, so they should be fine.


Thanks
Piotr

W dniu 19.09.2016 o 17:28, Darshit Shah pisze:

Hi Piotr,

Thanks for your interest in Wget. I shall review your patch soon. 
However, for future reference please do not send patches that are 
pasted into the mail like this. It makes it extremely difficult for 
us to apply the patch. I was unable to apply the provided diff after 
simply saving your email.
Either use `git format-patch` to create a patch file that you attach 
to the emails, or use `git send-email` to correctly send an inline 
diff.


* pwa...@gmail.net.pl  [160918 18:41]:

Hi,
I've implemented fix for bug #45790. Basically I used approach Noel 
showed in comment.

Please check below diff if it's sane.

diff --git a/src/main.c b/src/main.c
index ac6ee2c..f324253 100644
--- a/src/main.c
+++ b/src/main.c
@@ -113,7 +113,7 @@ int numurls = 0;
  setting up gettext's message catalog using bindtextdomain and
  textdomain.  Does nothing if NLS is disabled or missing. */

-#if defined(SIGHUP) || defined(SIGUSR1)
+#if defined(SIGHUP) || defined(SIGUSR1) || defined(SIGCONT)
/* Hangup signal handler.  When wget receives SIGHUP or SIGUSR1, it
  will proceed operation as usual, trying to write into a log file.
  If that is impossible, the output will be turned off.  */
@@ -131,12 +131,20 @@ redirect_output_signal (int sig)
 if (sig == SIGUSR1)
   signal_name = "SIGUSR1";
#endif
+#ifdef SIGCONT
+  if(sig == SIGCONT) {
+/* If process goes to foreground, don't redirect output */
+if(getpgrp() == tcgetpgrp(STDOUT_FILENO))
+  return;
+signal_name = "SIGCONT";
+  }
+#endif

 log_request_redirect_output (signal_name);
 progress_schedule_redirect ();
 signal (sig, redirect_output_signal);
}
-#endif /* defined(SIGHUP) || defined(SIGUSR1) */
+#endif /* defined(SIGHUP) || defined(SIGUSR1) || defined(SIGCONT)*/

static void
i18n_initialize (void)
@@ -2003,6 +2011,9 @@ only if outputting to a regular file.\n"));
#ifdef SIGUSR1
 signal (SIGUSR1, redirect_output_signal);
#endif
+#ifdef SIGCONT
+  signal (SIGCONT, redirect_output_signal);
+#endif
#ifdef SIGPIPE
 /* Writing to a closed socket normally signals SIGPIPE, and the
process exits.  What we want is to ignore SIGPIPE and just check

Thanks
Piotr












Re: [Bug-wget] bug #45790: wget prints it's progress even when background

2016-09-19 Thread pwa...@gmail.net.pl

Hi Darshit,
Sorry for pasting patch into email incorrectly. I've send 2 other 
patches before, but as attachments, so they should be fine.


Thanks
Piotr

W dniu 19.09.2016 o 17:28, Darshit Shah pisze:

Hi Piotr,

Thanks for your interest in Wget. I shall review your patch soon. 
However, for future reference please do not send patches that are 
pasted into the mail like this. It makes it extremely difficult for us 
to apply the patch. I was unable to apply the provided diff after 
simply saving your email.
Either use `git format-patch` to create a patch file that you attach 
to the emails, or use `git send-email` to correctly send an inline diff.


* pwa...@gmail.net.pl  [160918 18:41]:

Hi,
I've implemented fix for bug #45790. Basically I used approach Noel 
showed in comment.

Please check below diff if it's sane.

diff --git a/src/main.c b/src/main.c
index ac6ee2c..f324253 100644
--- a/src/main.c
+++ b/src/main.c
@@ -113,7 +113,7 @@ int numurls = 0;
   setting up gettext's message catalog using bindtextdomain and
   textdomain.  Does nothing if NLS is disabled or missing.  */

-#if defined(SIGHUP) || defined(SIGUSR1)
+#if defined(SIGHUP) || defined(SIGUSR1) || defined(SIGCONT)
/* Hangup signal handler.  When wget receives SIGHUP or SIGUSR1, it
   will proceed operation as usual, trying to write into a log file.
   If that is impossible, the output will be turned off.  */
@@ -131,12 +131,20 @@ redirect_output_signal (int sig)
  if (sig == SIGUSR1)
signal_name = "SIGUSR1";
#endif
+#ifdef SIGCONT
+  if(sig == SIGCONT) {
+/* If process goes to foreground, don't redirect output */
+if(getpgrp() == tcgetpgrp(STDOUT_FILENO))
+  return;
+signal_name = "SIGCONT";
+  }
+#endif

  log_request_redirect_output (signal_name);
  progress_schedule_redirect ();
  signal (sig, redirect_output_signal);
}
-#endif /* defined(SIGHUP) || defined(SIGUSR1) */
+#endif /* defined(SIGHUP) || defined(SIGUSR1) || defined(SIGCONT)*/

static void
i18n_initialize (void)
@@ -2003,6 +2011,9 @@ only if outputting to a regular file.\n"));
#ifdef SIGUSR1
  signal (SIGUSR1, redirect_output_signal);
#endif
+#ifdef SIGCONT
+  signal (SIGCONT, redirect_output_signal);
+#endif
#ifdef SIGPIPE
  /* Writing to a closed socket normally signals SIGPIPE, and the
 process exits.  What we want is to ignore SIGPIPE and just check

Thanks
Piotr








Re: [Bug-wget] bug #45790: wget prints it's progress even when background

2016-09-19 Thread Darshit Shah

Hi Piotr,

Thanks for your interest in Wget. I shall review your patch soon.  
However, for future reference please do not send patches that are pasted 
into the mail like this. It makes it extremely difficult for us to apply 
the patch. I was unable to apply the provided diff after simply saving 
your email. 

Either use `git format-patch` to create a patch file that you attach to 
the emails, or use `git send-email` to correctly send an inline diff.


* pwa...@gmail.net.pl  [160918 18:41]:

Hi,
I've implemented fix for bug #45790. Basically I used approach Noel 
showed in comment.

Please check below diff if it's sane.

diff --git a/src/main.c b/src/main.c
index ac6ee2c..f324253 100644
--- a/src/main.c
+++ b/src/main.c
@@ -113,7 +113,7 @@ int numurls = 0;
   setting up gettext's message catalog using bindtextdomain and
   textdomain.  Does nothing if NLS is disabled or missing.  */

-#if defined(SIGHUP) || defined(SIGUSR1)
+#if defined(SIGHUP) || defined(SIGUSR1) || defined(SIGCONT)
/* Hangup signal handler.  When wget receives SIGHUP or SIGUSR1, it
   will proceed operation as usual, trying to write into a log file.
   If that is impossible, the output will be turned off.  */
@@ -131,12 +131,20 @@ redirect_output_signal (int sig)
  if (sig == SIGUSR1)
signal_name = "SIGUSR1";
#endif
+#ifdef SIGCONT
+  if(sig == SIGCONT) {
+/* If process goes to foreground, don't redirect output */
+if(getpgrp() == tcgetpgrp(STDOUT_FILENO))
+  return;
+signal_name = "SIGCONT";
+  }
+#endif

  log_request_redirect_output (signal_name);
  progress_schedule_redirect ();
  signal (sig, redirect_output_signal);
}
-#endif /* defined(SIGHUP) || defined(SIGUSR1) */
+#endif /* defined(SIGHUP) || defined(SIGUSR1) || defined(SIGCONT)*/

static void
i18n_initialize (void)
@@ -2003,6 +2011,9 @@ only if outputting to a regular file.\n"));
#ifdef SIGUSR1
  signal (SIGUSR1, redirect_output_signal);
#endif
+#ifdef SIGCONT
+  signal (SIGCONT, redirect_output_signal);
+#endif
#ifdef SIGPIPE
  /* Writing to a closed socket normally signals SIGPIPE, and the
 process exits.  What we want is to ignore SIGPIPE and just check

Thanks
Piotr



--
Thanking You,
Darshit Shah
PGP Fingerprint: 7845 120B 07CB D8D6 ECE5 FF2B 2A17 43ED A91A 35B6


signature.asc
Description: PGP signature


[Bug-wget] bug #45790: wget prints it's progress even when background

2016-09-18 Thread pwa...@gmail.net.pl

Hi,
I've implemented fix for bug #45790. Basically I used approach Noel 
showed in comment.

Please check below diff if it's sane.

diff --git a/src/main.c b/src/main.c
index ac6ee2c..f324253 100644
--- a/src/main.c
+++ b/src/main.c
@@ -113,7 +113,7 @@ int numurls = 0;
setting up gettext's message catalog using bindtextdomain and
textdomain.  Does nothing if NLS is disabled or missing.  */

-#if defined(SIGHUP) || defined(SIGUSR1)
+#if defined(SIGHUP) || defined(SIGUSR1) || defined(SIGCONT)
 /* Hangup signal handler.  When wget receives SIGHUP or SIGUSR1, it
will proceed operation as usual, trying to write into a log file.
If that is impossible, the output will be turned off.  */
@@ -131,12 +131,20 @@ redirect_output_signal (int sig)
   if (sig == SIGUSR1)
 signal_name = "SIGUSR1";
 #endif
+#ifdef SIGCONT
+  if(sig == SIGCONT) {
+/* If process goes to foreground, don't redirect output */
+if(getpgrp() == tcgetpgrp(STDOUT_FILENO))
+  return;
+signal_name = "SIGCONT";
+  }
+#endif

   log_request_redirect_output (signal_name);
   progress_schedule_redirect ();
   signal (sig, redirect_output_signal);
 }
-#endif /* defined(SIGHUP) || defined(SIGUSR1) */
+#endif /* defined(SIGHUP) || defined(SIGUSR1) || defined(SIGCONT)*/

 static void
 i18n_initialize (void)
@@ -2003,6 +2011,9 @@ only if outputting to a regular file.\n"));
 #ifdef SIGUSR1
   signal (SIGUSR1, redirect_output_signal);
 #endif
+#ifdef SIGCONT
+  signal (SIGCONT, redirect_output_signal);
+#endif
 #ifdef SIGPIPE
   /* Writing to a closed socket normally signals SIGPIPE, and the
  process exits.  What we want is to ignore SIGPIPE and just check

Thanks
Piotr



[Bug-wget] [bug #45790] wget prints it's progress even when background

2015-08-18 Thread NoëlKöthe
URL:
  http://savannah.gnu.org/bugs/?45790

 Summary: wget prints it's progress even when background
 Project: GNU Wget
Submitted by: nok
Submitted on: Di 18 Aug 2015 11:03:31 CEST
Category: User Interface
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Privacy: Public
 Assigned to: None
 Originator Name: 
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any
 Release: None
Operating System: None
 Reproducibility: None
   Fixed Release: None
 Planned Release: None
  Regression: None
   Work Required: None
  Patch Included: None

___

Details:

Hello,

an old forgotten bug report:

--8--
When wget is suspended in command line and then
send into background (eg using bash bg command), it continues
to print it's progress messages. This leads to either stopping
wget or to garbling terminal with wget messages (depending
on the TOSTOP terminal setting).
--8--
My suggestion is to stop printing verbose progress messages
when the job is resumed in background. It could be checked
by (successful) getpgrp() not equal to (successful) tcgetprp(1)
in SIGCONT signal handler.
 And something like this is used in some console applications,
for example, in lftp.
--8--
https://bugs.debian.org/281201

As an example:

# wget
http://cdimage.debian.org/debian-cd/current/multi-arch/iso-cd/debian-8.1.0-amd64-i386-netinst.iso
Press ctrl+z
[1]+  Stopped  wget
http://cdimage.debian.org/debian-cd/current/multi-arch/iso-cd/debian-8.1.0-amd64-i386-netinst.iso
nk@pro:/tmp/test$ bg
garbling the terminal but commands work as expected

Regards

Noël




___

Reply to this item at:

  http://savannah.gnu.org/bugs/?45790

___
  Nachricht gesendet von/durch Savannah
  http://savannah.gnu.org/




Re: [Bug-wget] [bug #45790] wget prints it's progress even when background

2015-08-18 Thread Giuseppe Scrivano
Darshit Shah dar...@gmail.com writes:

 This affects an invokation using the shell's background operator () too.

 E.g.: wget 
 http://cdimage.debian.org/debian-cd/current/multi-arch/iso-cd/debian-8.1.0-amd64-i386-netinst.iso
 
 will cause the logging output and progress bar to be displayed on the
 terminal as explained in the bug report.

 However, I am not willing to fix that behaviour. A huge number of
 people copy URLs and paste them in their terminals for Wget to
 download without double-quoting them. A large number of these URLs
 have the  character which causes the shell to background the
 process. They tend to realise that something went wrong when the
 screen is garbled by a background process spewing messages to stdout
 and stderr. If this behaviour is changed, many people won't realise
 their error and un-necessarily invoke multiple instances of
 backgrounded Wget processes, eventually coming back here with new bug
 reports.

 The bahviour has remained so for a long time and I'm inclined to
 retain the status quo.

I agree with you here, the behavior should not be changed.  It would be
a bug if wget stops reporting errors when resumed.

Regards,
Giuseppe



Re: [Bug-wget] [bug #45790] wget prints it's progress even when background

2015-08-18 Thread Darshit Shah
This affects an invokation using the shell's background operator () too.

E.g.: wget 
http://cdimage.debian.org/debian-cd/current/multi-arch/iso-cd/debian-8.1.0-amd64-i386-netinst.iso

will cause the logging output and progress bar to be displayed on the
terminal as explained in the bug report.

However, I am not willing to fix that behaviour. A huge number of
people copy URLs and paste them in their terminals for Wget to
download without double-quoting them. A large number of these URLs
have the  character which causes the shell to background the
process. They tend to realise that something went wrong when the
screen is garbled by a background process spewing messages to stdout
and stderr. If this behaviour is changed, many people won't realise
their error and un-necessarily invoke multiple instances of
backgrounded Wget processes, eventually coming back here with new bug
reports.

The bahviour has remained so for a long time and I'm inclined to
retain the status quo.

On Tue, Aug 18, 2015 at 2:33 PM, NoëlKöthe invalid.nore...@gnu.org wrote:
 URL:
   http://savannah.gnu.org/bugs/?45790

  Summary: wget prints it's progress even when background
  Project: GNU Wget
 Submitted by: nok
 Submitted on: Di 18 Aug 2015 11:03:31 CEST
 Category: User Interface
 Severity: 3 - Normal
 Priority: 5 - Normal
   Status: None
  Privacy: Public
  Assigned to: None
  Originator Name:
 Originator Email:
  Open/Closed: Open
  Discussion Lock: Any
  Release: None
 Operating System: None
  Reproducibility: None
Fixed Release: None
  Planned Release: None
   Regression: None
Work Required: None
   Patch Included: None

 ___

 Details:

 Hello,

 an old forgotten bug report:

 --8--
 When wget is suspended in command line and then
 send into background (eg using bash bg command), it continues
 to print it's progress messages. This leads to either stopping
 wget or to garbling terminal with wget messages (depending
 on the TOSTOP terminal setting).
 --8--
 My suggestion is to stop printing verbose progress messages
 when the job is resumed in background. It could be checked
 by (successful) getpgrp() not equal to (successful) tcgetprp(1)
 in SIGCONT signal handler.
  And something like this is used in some console applications,
 for example, in lftp.
 --8--
 https://bugs.debian.org/281201

 As an example:

 # wget
 http://cdimage.debian.org/debian-cd/current/multi-arch/iso-cd/debian-8.1.0-amd64-i386-netinst.iso
 Press ctrl+z
 [1]+  Stopped  wget
 http://cdimage.debian.org/debian-cd/current/multi-arch/iso-cd/debian-8.1.0-amd64-i386-netinst.iso
 nk@pro:/tmp/test$ bg
 garbling the terminal but commands work as expected

 Regards

 Noël




 ___

 Reply to this item at:

   http://savannah.gnu.org/bugs/?45790

 ___
   Nachricht gesendet von/durch Savannah
   http://savannah.gnu.org/




-- 
Thanking You,
Darshit Shah