Comments (9)
-m: This option shall be supported if the implementation supports the User Portability Utilities option. All jobs shall be run in their own process groups. Immediately before the shell issues a prompt after completion of the background job, a message reporting the exit status of the background job shall be written to standard error. If a foreground job stops, the shell shall write a message to standard error to that effect, formatted as described by the jobs utility. In addition, if a job changes status other than exiting (for example, if it stops for input or output or is stopped by a SIGSTOP signal), the shell shall write a similar message immediately prior to writing the next prompt. This option is enabled by default for interactive shells.
Related:
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/bg.html
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/fg.html
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/kill.html
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/wait.html
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_204
from mrsh.
Some docs: https://www.gnu.org/software/libc/manual/html_node/Job-Control.html#Job-Control
from mrsh.
First step would be to make the glibc manual code work: https://git.sr.ht/~emersion/minishell
from mrsh.
Job control has been mostly sorted out now. Two builtins have been implemented: fg
and bg
. Other builtins will be easy to implement.
from mrsh.
- Check disabling job control does the right thing
- Store the AST that started each job (required for pretty-printing it)
- Add support for
fg
andbg
optional argument - Add
kill
,wait
- Print terminated/stopped jobs info before printing PS1
from mrsh.
To store the AST, I think I'll make mrsh_job
able to contain zero jobs so that we can create the job when executing the pipeline or async list.
from mrsh.
Jobs now store the AST node they have been created for.
from mrsh.
Nice ^^
from mrsh.
Job control has been almost completely sorted out by now, the complicated part is implemented. I've opened separate issues for the remaining bits.
from mrsh.
Related Issues (20)
- Build failure on Mac OS X 10.13.2 (Unable to specify soname (is Darwin supported?)) HOT 6
- $HOME/.mrsh_history isn't getting created HOT 1
- Add local builtin
- ${var:->>} causes syntax error
- expected a factor after + or - operator HOT 1
- ${*} causes syntax error
- case $var$# causes syntax error
- newline after EOF inside function causes syntax error
- backslash(line break) in case statement causes syntax error
- ${var##*[!/]} produces weird output
- trapping more than one signal causes segfault on exit
- Consider renaming "editline" references to "libedit" HOT 1
- Randomly getting "setpgid: Permission denied"
- Missing `test/conformance/if.sh` in repository HOT 1
- Aliases not being used while parsing contents of the `$ENV` file
- Function output cannot be redirected
- FAILED: meson-test in AUR HOT 1
- Implement all dash commands.
- -DHAVE_EDITLINE is not set when configuring with libedit
- SIGINT handling on multiline PS1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mrsh.