[bash]Pick up process running in back up by another terminal...
wow the title was avoiding me...
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? |
I am not sure if I understand what you mean but 'screen' might be what you're looking for.
|
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.
|
Quote:
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. |
@i92guboj
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 |
Quote:
|
All times are GMT -5. The time now is 10:29 PM. |