pharo-project / pharo-launcher

Lets you manage your pharo images and download new ones
https://pharo-project.github.io/pharo-launcher/
MIT License
109 stars 46 forks source link

[Command Line] Attach the terminal to a running image #666

Closed PalumboN closed 9 months ago

PalumboN commented 10 months ago

Would be nice to list all the processes running a Pharo image and be able to attach the terminal to one process.

We can also have a shortcut with this behavior automatically when an image is launched.

PalumboN commented 9 months ago

More info about this: Now the terminal shows the output of the pharo image, even after returning the prompt to the user (you can use the console). Here is a screenshot:

image

This is a bit strange for me, I was not expecting that behavior. I think that the best is either to attach the terminal to Pharo (not returning the control to the user) or just launch the image and disconnect the terminal from it.

demarey commented 9 months ago

Pharo Launcher CLI now launches images in attached mode: it means the command will ony return when image quit. You will stil get stdout and stderr printed to the terminal. In addtion, a CTRL+C will stop/abort the image.

It looks like there is no easy way to run a process detached and attach to it afterwards. Would the current (new) behavior be ok for you?

PalumboN commented 9 months ago

Would the current (new) behavior be ok for you?

Yes @demarey ! Thank you!!

Anyway maybe would be nice to not lose the current behavior for those who want to launch the image and close de terminal... I don't know (?

🚀 👨‍💻 🧮

demarey commented 9 months ago

Here it is: https://github.com/pharo-project/pharo-launcher/commit/723df186a684bcc320a69e11a7952991ef6b555a