[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 5.3-alpha: the `jobs' builtin prints foreground dead jobs with funct
From: |
Robert Elz |
Subject: |
Re: 5.3-alpha: the `jobs' builtin prints foreground dead jobs with function substitutions |
Date: |
Tue, 30 Apr 2024 05:29:24 +0700 |
Date: Mon, 29 Apr 2024 16:07:26 -0400
From: Chet Ramey <chet.ramey@case.edu>
Message-ID: <11d627e9-174c-40a8-b827-0a2678d580d1@case.edu>
| So the question is what exactly constitutes a foreground job whose status
| has "not been reported."
I doubt it is stated anywhere, but I would treat any job whose status has
been collected in $? as having been reported.
So does bash in general, if one does
ls; jobs
The jobs command doesn't report ls as being done, yet that status hasn't
been reported to the user any other way previously - $? was set however.
I don't see any reason there should be any difference for a process that
was run in one of the new non-forking command substitution type things, nor
when jobs is run from one of those.
kre
kre
Does that exempt terminated foreground jobs whose
| status would not be reported when the shell reaps jobs before printing
| $PS1? That would be jobs that exited normally or jobs that exited due to
| a signal we don't report on (SIGINT, possibly SIGPIPE, in interactive
| shells). Or is it jobs that have changed status and the shell hasn't yet
| determined whether it will notify the user about them?
|
| --
| ``The lyf so short, the craft so long to lerne.'' - Chaucer
| ``Ars longa, vita brevis'' - Hippocrates
| Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
|
|
| --------------0M90DFuqqiWGvApMToi1SVH4--
|
| --------------3iuEVNvWX3PGkPusU7DflOgI
| Content-Type: application/pgp-signature; name="OpenPGP_signature.asc"
| Content-Description: OpenPGP digital signature
| Content-Disposition: attachment; filename="OpenPGP_signature.asc"
|
| -----BEGIN PGP SIGNATURE-----
|
| wmMEABEIACMWIQR8ATX7CIqvbGbGULm7WGnwZOp0qwUCZi/9/gUDAAAAAAAKCRC7WGnwZOp0qzsK
| AJ9jegObeVGsxO0MkjIe9Aj+9OsjOACgjwyUnT+z8Zu0vpmmlu5F5uJpwTM=
| =Deb6
| -----END PGP SIGNATURE-----
|
| --------------3iuEVNvWX3PGkPusU7DflOgI--
|
|