Comments (4)
My plan at this point is to have unix-style job control for pipelines consisting only of subprocess, and punt job control for other things to a future time.
Job control involving Racket code really wants to be thread-based, and would just use threads except that various bits of state are thread-local. For example, cd
changes the current-directory
parameter, but if it's run in a different thread then it won't change anything outside of that thread since parameters are thread-local. If there were a way to get the state out of a completed thread, I think that is how I would want to do job control for Racket commands -- run in a thread, and then when the foreground thread finishes update the REPL thread with the state from the done foreground thread.
from racket-rash.
Another new embedded lisp shell Janetsh has job control working, so perhaps I should see what series of syscalls it's using and how it differs from my job-control branch. It's likely to have cleaner code there than Bash and Zsh, which I was looking at when I was trying to implement it.
from racket-rash.
I made some progress on this today. One major problem from the last time I tried it is that there is some initialization that the shell must do that I didn't know about. Now that's working. The biggest problem now is what to do about Racket using SIGCHLD
, which notifies a parent when a child exits OR stops (I think). Anyway, I can wait for the subprocess to exit with Racket, but I also need to be able to wait on subprocesses stopping, eg. when they get SIGTSTP
, so the shell can resume with the job backgrounded. If I can figure out how to do that, then it should be pretty easy to get my code otherwise working.
from racket-rash.
Well, I'm not so sure about using SIGCHLD
, but I think waitpid
is the right way to do this. But Racket uses waitpid
as well, perhaps I need to figure out what it's doing and see if it conflicts with what I'm trying to do...
from racket-rash.
Related Issues (20)
- some packages are downloaded via HTTP ? HOT 7
- [Windows] libedit-3.dll issues HOT 9
- I've been waiting for something like this for a long time HOT 1
- Save history between sessions? HOT 1
- SIGPIPE issue
- Ctrl-C handling HOT 4
- testing maubot integration
- Relicensing Rash HOT 8
- Allow comment with # in repl HOT 1
- terminal title with current directory HOT 2
- Tab completion does not quote
- ls causes issues with history-delete HOT 18
- Can't exit shell on Mac OS X HOT 2
- Behavior of Control-c (C-c, ^C, SIGINT) when no process is active HOT 3
- How to build documentation? HOT 2
- contract violation on 8.2[cs]? HOT 6
- Resizing terminal emulator
- Rash in Jupyter (with iracket) HOT 5
- multi-line readline prompt with ansi-escapes HOT 3
- Get the exit code of the last command HOT 2
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 racket-rash.