[Bug 261200] Unable to pipe the output of jobs in sh

2022-01-24 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261200 --- Comment #9 from Fernando ApesteguĂ­a --- Thanks for the explanation Jills! Would you consider adding the modification to the man page? I am not an src committer or a member of manpages. Cheers. -- You are receiving this mail because:

[Bug 261200] Unable to pipe the output of jobs in sh

2022-01-18 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261200 --- Comment #8 from Ron Wills --- Created attachment 231147 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=231147&action=edit Update man page about piping with job control commands Here's a proposed update to the man page to add

[Bug 261200] Unable to pipe the output of jobs in sh

2022-01-18 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261200 --- Comment #7 from Ron Wills --- Okay now this is making sense. Simple examples: $ jobs Outputs from the current shell. $ jobs | cat Jobs is now in a subshell, created by the pipe, with a new jobs table so no output. $ echo $(jobs) |

[Bug 261200] Unable to pipe the output of jobs in sh

2022-01-18 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261200 --- Comment #6 from Jilles Tjoelker --- The reason that jobs cannot be piped is that an element of a pipeline (with more than one element) is run in a subshell environment, and the subshell environment has its own jobs. For example, sh -c

[Bug 261200] Unable to pipe the output of jobs in sh

2022-01-18 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261200 --- Comment #5 from Ron Wills --- While tracing a simple script like: sleep 1000& jobs jobs | cat I find that the first execution of jobs is executed by the shell process itself and the second piped jobs is forked then executed in a child

[Bug 261200] Unable to pipe the output of jobs in sh

2022-01-15 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261200 Fernando ApesteguĂ­a changed: What|Removed |Added Status|New |Open CC|

[Bug 261200] Unable to pipe the output of jobs in sh

2022-01-15 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261200 Ron Wills changed: What|Removed |Added Attachment #231005|0 |1 is obsolete|

[Bug 261200] Unable to pipe the output of jobs in sh

2022-01-15 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261200 --- Comment #3 from Ron Wills --- Created attachment 231025 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=231025&action=edit Jobs piping testcase Makes the test output a bit clearer. -- You are receiving this mail because: Yo

[Bug 261200] Unable to pipe the output of jobs in sh

2022-01-15 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261200 --- Comment #2 from Ron Wills --- (In reply to Graham Perrin from comment #1) It's hard to tell if this is a feature or a bug. It's completely undocumented from what I can tell. As I do more testing, I can pipe the output of other builtin

[Bug 261200] Unable to pipe the output of jobs in sh

2022-01-15 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261200 --- Comment #1 from Graham Perrin --- (In reply to Ron Wills from comment #0) If not a bug, might this be a question for Stack Exchange? Here, without using sh: % sleep 10 & [1] 12372 % sleep 10 & [2] 12374 % sleep 10 & [3] 12376 % job

[Bug 261200] Unable to pipe the output of jobs in sh

2022-01-14 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261200 Bug ID: 261200 Summary: Unable to pipe the output of jobs in sh Product: Base System Version: 13.0-STABLE Hardware: amd64 OS: Any Status: New Severi