bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Misleading phrasing about $! in documentation


From: Chris Down
Subject: Misleading phrasing about $! in documentation
Date: Wed, 31 Jul 2013 11:17:09 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

I think our documentation on $! is a little misleading. `man bash' states:

    Special Parameters
        The shell treats several parameters specially. These parameters may only
        be referenced; assignment to them is not allowed.

        [...]

        ! Expands to the process ID of the most recently executed background
        (asynchronous) command.

I don't think this statement is true. Take this as an example:

    $ sleep 60
    ^Z
    [1]+  Stopped                 sleep 60
    $ sleep 60 &
    [2] 6580
    $ bg
    [1]+ sleep 60 &
    $ echo "$!"
    6579

The pipeline with the PID referenced by $! was not executed last, it was merely
backgrounded last. I suggest s/executed background/backgrounded/.

If this is accepted as valid, I will happily write and attach a patch.

Best,

Chris

Attachment: pgpmouDhPoySX.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]