[SOLVED] [bash]Pick up process running in back up by another terminal...
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Not that I know of but you could write a script that runs a delayed loop (a loop with a sleep in it) that checks whether that process is running and when it isn't executes poweroff.
what happens is the following, I am compiling something that will take a while, but I have to go to work.
I did not add the && poweroff that I usually add when i leave the computer because I didnt know it was going to take that long...
the question is:
Is there a way to open a new terminal and pick up that runing process and add a trap to it or something similar?
You can write the command in the same terminal and then press enter, once the task at hand ends the next command will run.
However if you can identify the main process of the compilation you could very well use the "wait" command in other terminal to wait for that process to end. That's risky however, because compilations usually spawns a lot of child processes and they can be hard to identify.
lol that is something that I knew since the dawn of time (that while it is working you can actually type a command and when the other finishes then the command gets executed) but now that i REALLY NEED IT i didnt remeber... Thanks I guess that solves it
lol that is something that I knew since the dawn of time (that while it is working you can actually type a command and when the other finishes then the command gets executed) but now that i REALLY NEED IT i didnt remeber... Thanks I guess that solves it
hehe, yeah, it happens from time to time to everyone that we don't see the evident thing and instead try to find some sophisticated way to solve a trivial problem, no one is immune to that
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.