Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run command in the background with & #133

Open
dundalek opened this issue Apr 19, 2019 · 2 comments
Open

Run command in the background with & #133

dundalek opened this issue Apr 19, 2019 · 2 comments

Comments

@dundalek
Copy link
Owner

This might involve needing to implement job control to keep track of running background processes.

@djblue
Copy link
Contributor

djblue commented Aug 14, 2019

@dundalek Did you have any ideas on how job control should be implemented?

@dundalek
Copy link
Owner Author

@djblue My thought process is that I don't think I've ever needed the full job control using jobs, fg and bg during all my years with bash. Therefore I would like to try if it is possible to make something simpler.

I imagine we could wrap background processes in a future (to make them run in a separate thread so they don't block in case there is a clojure computation as part of the pipeline). When you want to wait for the the process you just deref the future, which will either give you the result or block until the process completes.

I have a work in progress branch that adds support for the & to the parser. After that it should be just adding the future wrapping part to the compiler code.

What do you think? Is there maybe some use that would be missed out by such approach?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants