Score:0

get process back to screen

pk flag

I was in a screen session with a python script running in the background. I terminated the screen with the exit command so when I check with

screen -ls

there are no sockets and with

jobs

I can see that the script is also not running in the session. But as i can see with htop for example the script is still a process. Here is the corresponding line of

ps -aux | grep python

username 3012950 99.8 0.8 101140 70524 ? R Feb16 1749:20 python3 ./radius.py 2000

Is there a way to put this process back to were it was, in a screen session? Or in general take it back from where ever it is now back to the 'normal' background or foreground?

pa4080 avatar
cn flag
Hello, how did you push that process in the background?
Celdor avatar
pk flag
I started the script with `./radius.py 2000 &` and then terminated the screen with the exit command.
pa4080 avatar
cn flag
You could try this: [How do I attach a terminal to a detached process?](https://unix.stackexchange.com/q/31824/201297). But, IMO, *screen* and *tmux* are designed just for this purpose - just detach the session instead of exit it.
Celdor avatar
pk flag
I actually terminated the screen with the exit command by accident because i was in an ssh session. But I got curious where the process went. ^^
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.