Note: the situation described here is completely different from this one.

I have a couple of still-attached screen sessions, but screen -list produces

% screen -list
No Sockets found in /tmp/uscreens/S-jones.

I've tried to send SIGCHLD signals to the screen process, and I have also killed some of the shells running under them (in the hope that this would cause the kernel to send some signal to these processes). The theory behind all this is that such signals would cause screen to re-create the appropriate sockets under /tmp/uscreens. But none of these things worked.

Since the sessions are still attached, is there anything that I can do within each session to have it regenerate the appropriate sockets?

1 Answer 1


This happened to me when I did an update that changed the default SCREENDIR with several active sessions. Like you, I couldn't convince it to regenerate the fifo (there's probably a bug report worth filing somewhere in this), so what I ended up doing was using reptyr to transition everything relevant to a new session. It's tedious, but allowed me to preserve my state (as well as learn a bit). Here are the steps I used; this can probably be streamlined or scripted:

  1. Find the screen PID you want to transition, and get its list of child processes (I used pstree -ps $PID)
  2. For each child process, get its PID and...
    • If it's a shell...
      • with nothing else running, reptyr $PID
      • with a normal process running in it, SIGTSTP it (^z or kill -TSTP $PID), bg it, disown $PID it, and reptyr $PID; fg.
    • If there's a process with children, reptyr -T $PID
    • If there's a normal process, reptyr $PID

This may not be foolproof, and I ended up with shells-in-shells and stuff like that, but it could be worse.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.