manual/jobs.texi: remove unused var from example code

Message ID 20200523191809.19663-1-aurelien.aptel@gmail.com
State Committed
Commit 74edc05817c126212c826c1a046a9465d0efe287
Headers
Series manual/jobs.texi: remove unused var from example code |

Commit Message

Aurélien Aptel May 23, 2020, 7:18 p.m. UTC
  The do_job_notification() function defines a variable without using
it. Remove it.
---
 manual/job.texi | 1 -
 1 file changed, 1 deletion(-)
  

Comments

Aurélien Aptel June 3, 2020, 12:50 p.m. UTC | #1
ping

On Sat, May 23, 2020 at 9:18 PM Aurelien Aptel <aurelien.aptel@gmail.com> wrote:
>
> The do_job_notification() function defines a variable without using
> it. Remove it.
> ---
>  manual/job.texi | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/manual/job.texi b/manual/job.texi
> index 05a42ea820..42cb9fb26d 100644
> --- a/manual/job.texi
> +++ b/manual/job.texi
> @@ -860,7 +860,6 @@ void
>  do_job_notification (void)
>  @{
>    job *j, *jlast, *jnext;
> -  process *p;
>
>    /* @r{Update status information for child processes.}  */
>    update_status ();
> --
> 2.26.2
>
  
Carlos O'Donell June 3, 2020, 8:47 p.m. UTC | #2
On 5/23/20 3:18 PM, Aurelien Aptel via Libc-alpha wrote:
> The do_job_notification() function defines a variable without using
> it. Remove it.

OK for master.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>

> ---
>  manual/job.texi | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/manual/job.texi b/manual/job.texi
> index 05a42ea820..42cb9fb26d 100644
> --- a/manual/job.texi
> +++ b/manual/job.texi
> @@ -860,7 +860,6 @@ void
>  do_job_notification (void)
>  @{
>    job *j, *jlast, *jnext;
> -  process *p;
>  
>    /* @r{Update status information for child processes.}  */
>    update_status ();
>
  
Florian Weimer June 3, 2020, 9:07 p.m. UTC | #3
* Carlos O'Donell via Libc-alpha:

> On 5/23/20 3:18 PM, Aurelien Aptel via Libc-alpha wrote:
>> The do_job_notification() function defines a variable without using
>> it. Remove it.
>
> OK for master.
>
> Reviewed-by: Carlos O'Donell <carlos@redhat.com>

Are you going to apply this?

If you do, please be careful because due to the mailing list mangling,
you cannot use “git am”.

Thanks,
Florian
  
Carlos O'Donell June 3, 2020, 10:16 p.m. UTC | #4
On 6/3/20 5:07 PM, Florian Weimer wrote:
> * Carlos O'Donell via Libc-alpha:
> 
>> On 5/23/20 3:18 PM, Aurelien Aptel via Libc-alpha wrote:
>>> The do_job_notification() function defines a variable without using
>>> it. Remove it.
>>
>> OK for master.
>>
>> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
> 
> Are you going to apply this?

I am.

> If you do, please be careful because due to the mailing list mangling,
> you cannot use “git am”.

Patchwork sees things before mangling, and my workflow takes advantage of that.

# git-pw patch apply 39357;

*AND* for the gold star, it auto-applies my reviewed-by line because patchwork
is tracking them (along with other tags).

commit 74edc05817c126212c826c1a046a9465d0efe287 (HEAD -> master)
Author: Aurélien Aptel <aurelien.aptel@gmail.com>
Date:   Sat May 23 21:18:09 2020 +0200

    manual/jobs.texi: remove unused var from example code
    
    The do_job_notification() function defines a variable without using
    it. Remove it.
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>

commit a7a3435c9a0769744c7748f9d95510d0a99be7d1 (origin/master, origin/HEAD)
...

Isn't that nice!

Just built the manual, and verified the pdf looks good.

Commited.
  
Aurélien Aptel June 4, 2020, 12:18 p.m. UTC | #5
Great, thanks for applying the patch.

While reading and using this doc I also found a more important bug in
the example code, for which a bug was already opened 3 years ago but
not addressed:

https://sourceware.org/bugzilla/show_bug.cgi?id=22590

The sample code in the doc *cannot* work if SIGCHLD is ignored.
The quick fix would be to simply remove the `signal (SIGCHLD,
SIG_IGN);` line from Section 28.6.2 Initializing the Shell.
I've personally lost a lot of time on this... I can send a patch for
that if you'd like.

Cheers,
  

Patch

diff --git a/manual/job.texi b/manual/job.texi
index 05a42ea820..42cb9fb26d 100644
--- a/manual/job.texi
+++ b/manual/job.texi
@@ -860,7 +860,6 @@  void
 do_job_notification (void)
 @{
   job *j, *jlast, *jnext;
-  process *p;
 
   /* @r{Update status information for child processes.}  */
   update_status ();