Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
10-02-2013, 10:23 AM
|
#1
|
Senior Member
Registered: Dec 2008
Posts: 1,191
|
[BUG] "screen" will not exit unless ^Z
Update: Downgraded NVIDIA driver from 319.60 to 319.49 and the problem disappeared.
Hello,
I am running slackware-current (not slackware64-current, not slackwarearm-current, etc.) mirrored from ftp.slackware.com today.
When I start "screen" in an X terminal emulator, e.g. konsole or xterm, then press ^d or type "exit" to end the screen session, or detach from the session with "^a d", screen prints "[screen is terminating]" but I cannot go back to the shell prompt unless pressing ^Z (^C does not work).
There is no such problem in text tty. Only in X terminal emulators.
A recording is attached
Code:
chmod +x bbsplay.txt
./bbsplay.txt screen.log
Any idea? Thanks!
Last edited by guanx; 10-08-2013 at 07:06 AM.
|
|
|
10-02-2013, 10:59 AM
|
#2
|
Senior Member
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,817
|
i also have a -current machine and it's working fine here
tried ^d and ^a d and both are working
|
|
|
10-07-2013, 06:27 AM
|
#3
|
Senior Member
Registered: Dec 2008
Posts: 1,191
Original Poster
|
[removed]
Last edited by guanx; 10-07-2013 at 07:33 AM.
|
|
|
10-07-2013, 11:27 AM
|
#4
|
Senior Member
Registered: Dec 2008
Posts: 1,191
Original Poster
|
Strace shows that when this problem occurs, screen receives no SIGHUP which it ought to receive. The following patch fixes it but the origin of the bug is unknown to me
Code:
diff -ru screen-4.0.3.orig/screen.c screen-4.0.3/screen.c
--- screen-4.0.3.orig/screen.c 2003-09-08 16:26:41.000000000 +0200
+++ screen-4.0.3/screen.c 2013-10-07 17:15:07.068676486 +0200
@@ -360,14 +360,11 @@
#if (defined(AUX) || defined(_AUX_SOURCE)) && defined(POSIX)
setcompat(COMPAT_POSIX|COMPAT_BSDPROT); /* turn on seteuid support */
#endif
-#if defined(sun) && defined(SVR4)
{
- /* Solaris' login blocks SIGHUP! This is _very bad_ */
sigset_t sset;
sigemptyset(&sset);
sigprocmask(SIG_SETMASK, &sset, 0);
}
-#endif
/*
* First, close all unused descriptors
I am terrified by the coding style of screen. I see obvious use-after-free sometimes. The K&R manner gives me an impression that debugging this program is beyond my ability. So ... I don't know how I fixed it, nor will I know in the future.
|
|
|
10-07-2013, 11:55 AM
|
#5
|
LQ Veteran
Registered: May 2008
Posts: 7,106
|
"screen" does have somewhat of a reputation for dodgy code. Have you considered using tmux instead?
|
|
|
10-07-2013, 12:03 PM
|
#6
|
Senior Member
Registered: Dec 2008
Posts: 1,191
Original Poster
|
Quote:
Originally Posted by GazL
"screen" does have somewhat of a reputation for dodgy code. Have you considered using tmux instead?
|
Not yet, because screen is more widely installed and I see no strong reason to learn a new thing when the old suffices.
|
|
|
10-07-2013, 08:39 PM
|
#7
|
Slackware Maintainer
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 2,950
|
This patch doesn't look correct to me, and this part of the code is unchanged in git. Unless the problem with the code (and the fix) can be adequately explained I'm not going to apply this patch.
Besides that, screen is exiting correctly here on my -current machines in all of the terminal emulators that I tested. Not sure what could be different on your machine.
|
|
1 members found this post helpful.
|
10-08-2013, 12:49 AM
|
#8
|
Member
Registered: Mar 2010
Location: France
Distribution: Slackware
Posts: 603
|
Quote:
Originally Posted by guanx
Not yet, because screen is more widely installed and I see no strong reason to learn a new thing when the old suffices.
|
A good reason is the old is very buggy and doesn't seem maintain. I switched from screen to tmux (maybe two years ago) because of bugs, and I'm very happy with tmux.
|
|
1 members found this post helpful.
|
10-08-2013, 05:20 AM
|
#9
|
Senior Member
Registered: Dec 2008
Posts: 1,191
Original Poster
|
Quote:
Originally Posted by volkerdi
This patch doesn't look correct to me, and this part of the code is unchanged in git. Unless the problem with the code (and the fix) can be adequately explained I'm not going to apply this patch.
Besides that, screen is exiting correctly here on my -current machines in all of the terminal emulators that I tested. Not sure what could be different on your machine.
|
I find some bug reports which are probably related to this error:
http://lists.kde.org/?l=kde-core-dev...6773523973&w=4
http://lists.opensuse.org/opensuse-b.../msg05412.html
It looks very much like KDE should be fixed also, because sometimes I get SIGINT blocked upon KDE start, instead of SIGHUP. This is fatal because I use SIGINT much more often (Ctrl-C doesn't work). I confirmed by logging on and off to/from KDE in runlevel 4, and running this simple program:
Code:
$ cat siggetmask.c
#include <signal.h>
int main()
{
return siggetmask();
}
$ make siggetmask
cc siggetmask.c -o siggetmask
siggetmask.c: In function ‘main’:
siggetmask.c:5:5: warning: ‘siggetmask’ is deprecated (declared at /usr/include/signal.h:203) [-Wdeprecated-declarations]
return siggetmask();
^
$ ./siggetmask; echo $?
1 # sometimes it's 2, but in most cases 1
$
Anyway, because screen must use SIGHUP, it is good practice to ensure it unblocked. This patch above doesn't harm. Does it? I'm novice on signals. Please do point out if I'm wrong. Thanks!
|
|
|
10-08-2013, 05:29 AM
|
#10
|
Senior Member
Registered: Dec 2008
Posts: 1,191
Original Poster
|
Quote:
Originally Posted by Thom1b
A good reason is the old is very buggy and doesn't seem maintain. I switched from screen to tmux (maybe two years ago) because of bugs, and I'm very happy with tmux.
|
I'd be very happy to use tmux but most of the computers I use don't have it pre-installed. I can only find screen. And I don't have admin privilege on 1/3 of them. It's overkill to install tmux in my $HOME every time I touch a new computer.
Another reason to stay with screen is that when my colleagues ask me how to do something I can simply sent them the screen command, without asking them to install tmux first. Installing something seems more intrusive than running a well known command.
|
|
|
10-08-2013, 05:36 AM
|
#11
|
Member
Registered: Mar 2010
Location: France
Distribution: Slackware
Posts: 603
|
Quote:
Originally Posted by guanx
I'd be very happy to use tmux but most of the computers I use don't have it pre-installed. I can only find screen. And I don't have admin privilege on 1/3 of them. It's overkill to install tmux in my $HOME every time I touch a new computer.
|
You're right, this is a good reason to stay with screen.
Quote:
Originally Posted by guanx
Another reason to stay with screen is that when my colleagues ask me how to do something I can simply sent them the screen command, without asking them to install tmux first. Installing something seems more intrusive than running a well known command.
|
Now tmux is available in many distribution, maybe it's a good idea to suggest Pat to include tmux in slackware.
|
|
1 members found this post helpful.
|
10-08-2013, 07:07 AM
|
#12
|
Senior Member
Registered: Dec 2008
Posts: 1,191
Original Poster
|
Downgraded NVIDIA driver from 319.60 to 319.49 and the problem disappeared. If the error comes again I will update this thread.
|
|
1 members found this post helpful.
|
10-08-2013, 12:01 PM
|
#13
|
Senior Member
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 1,052
|
Hello,
I looked at this and experienced the same issue on slackware64-current (beta from sept 18) with nvidia 319.60, but only when screen is started from konsole. There's no problem when screen is started from uxterm, xterm, terminal.
Downgrading nvidia to 319.49 solves the problem.
I reinstalled nvidia 319.60, and, started Xfce. I tried screen inside konsole, and there's no issue. I returned to Kde, started screen inside konsole, and I encountered the issue again.
I also tried on slackware 14.0 with nvidia 319.60 and didn't experienced this issue.
--
SeB
|
|
|
10-08-2013, 12:53 PM
|
#14
|
Senior Member
Registered: Dec 2008
Posts: 1,191
Original Poster
|
Hi phenixia2003,
Thanks for your very clear description of your test result. I made a mistake in my previous tests by sometimes starting xterm/rxvt from konsole, then they inherited the signal mask of konsole.
My test result with slackware-current + NVIDIA 319.60 / 319.49 is identical to your result with slackware64-current.
|
|
|
01-04-2014, 01:23 AM
|
#15
|
Member
Registered: Apr 2011
Location: British Columbia, Canada
Posts: 304
Rep:
|
I ran into this same issue as well. Disabling most Desktop Effects fixed it for me (not sure exactly which one).
slackware64-current, KDE 4.12, NVIDIA 331.20
The issue is back. Switching to tmux.
Last edited by bosth; 01-07-2014 at 11:35 AM.
|
|
|
All times are GMT -5. The time now is 10:19 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|