Well it goes like this, I had to run a program from my home by ssh
ing into the server in my institution. I did not want my program to be terminated when the session closes(I didn't know about screen
).
What i did was press Ctrl+Z
and then type bg
so that it executes in the background.
The session got terminated. Now when I login from my institution machine and type ps -u username
, it shows that the program is still running but I'm unable to bring it to foreground.
I tried fg
and jobs
but these commands don't give me any output.
Please someone help me..
If you have started the process without using "screen" command then you cannot take over that process. Basically you cannot take over a process that was started in a different shell.
When your session is terminated all the bg process will go the detached state. Though you might be able to see the details of such process you cannot fg them to a shell from login afterwards