Discussion:
'screen' started in detached mode -- cannot reattach
Alexandre Bezroutchko
2010-04-28 15:28:58 UTC
Permalink
Hello,

I have read old posts describing reattachment problems related to
terminal settings and ssh. My problem appears to occur even if I launch
'screen' locally from rxvt.

I start 'screen -d -m MYCOMMAND' and it goes into background, as
intended. However, I cannot reattach to it, the reattaching 'screen'
process hangs. It is easy to reproduce:

sh-3.2# screen -d -m sleep 1000

sh-3.2# screen -ls
There is a screen on:
1072..rock (Detached)
1 Socket in /tmp/screens/S-abb.

sh-3.2# screen -r
...

Output of cygcheck is attached. Please help...

Best regards,
Alexandre Bezroutchko
http://www.gremwell.com/
Andrew Schulman
2010-04-28 16:08:23 UTC
Permalink
Post by Alexandre Bezroutchko
I start 'screen -d -m MYCOMMAND' and it goes into background, as
intended. However, I cannot reattach to it, the reattaching 'screen'
sh-3.2# screen -d -m sleep 1000
sh-3.2# screen -ls
1072..rock (Detached)
1 Socket in /tmp/screens/S-abb.
sh-3.2# screen -r
...
Alexandre, thanks for the report. I've never tried to start screen in
detached mode before, so I never enountered this. But I can confirm it
here. For me the results are a little different-- the terminal doesn't
hang, but it stops echoing keyboard input and newlines. I have to run
'reset' to get it working again. And after that, screen -ls lists the
detached session as dead.

Clearly this is a bug in screen, and it seems to be specific to Cygwin. I
can't reproduce it on my Ubuntu host.

Unfortunately, this is likely to be hard to solve. I don't have the
knowledge or time to debug it myself. You can report it to the
screen-users mailing list, but since it appears to be Cygwin-specific,
they're likely to send you back here.

Sorry. There is something about the way screen uses sockets that doesn't
work completely right in Cygwin, and no one has ever figured out what it
is. Mostly it does work right, and with the release of Cygwin 1.7 I'd
hoped we were done with it.

Andrew.
Alexandre Bezroutchko
2010-04-28 17:50:05 UTC
Permalink
Andrew,

Yes, I understand that it is not possible for you to invest too much
time into an exotic bug like this one. Thank you for the response.

Apparently, reattaching works from rxvt if the detached 'screen' process
was launched from the console. With a little bit of luck it let me
continue using cygwin/screen for my project, because I am spawning
'screen -d -m' from another process.

Regards,
Alex
Post by Andrew Schulman
Post by Alexandre Bezroutchko
I start 'screen -d -m MYCOMMAND' and it goes into background, as
intended. However, I cannot reattach to it, the reattaching 'screen'
sh-3.2# screen -d -m sleep 1000
sh-3.2# screen -ls
1072..rock (Detached)
1 Socket in /tmp/screens/S-abb.
sh-3.2# screen -r
...
Alexandre, thanks for the report. I've never tried to start screen in
detached mode before, so I never enountered this. But I can confirm it
here. For me the results are a little different-- the terminal doesn't
hang, but it stops echoing keyboard input and newlines. I have to run
'reset' to get it working again. And after that, screen -ls lists the
detached session as dead.
Clearly this is a bug in screen, and it seems to be specific to Cygwin. I
can't reproduce it on my Ubuntu host.
Unfortunately, this is likely to be hard to solve. I don't have the
knowledge or time to debug it myself. You can report it to the
screen-users mailing list, but since it appears to be Cygwin-specific,
they're likely to send you back here.
Sorry. There is something about the way screen uses sockets that doesn't
work completely right in Cygwin, and no one has ever figured out what it
is. Mostly it does work right, and with the release of Cygwin 1.7 I'd
hoped we were done with it.
Andrew.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Andrew Schulman
2010-04-28 18:22:30 UTC
Permalink
Post by Alexandre Bezroutchko
Yes, I understand that it is not possible for you to invest too much
time into an exotic bug like this one. Thank you for the response.
It's not exotic... just a bit unusual :) But it is important. I wish I
could solve it, but I can't commit the time to do it.
Post by Alexandre Bezroutchko
Apparently, reattaching works from rxvt if the detached 'screen' process
was launched from the console. With a little bit of luck it let me
continue using cygwin/screen for my project, because I am spawning
'screen -d -m' from another process.
OK. Interesting... I'd never thought of using screen that way before.
Andrew.

Continue reading on narkive:
Loading...