diff options
author | decke <decke@FreeBSD.org> | 2010-07-01 02:42:29 +0800 |
---|---|---|
committer | decke <decke@FreeBSD.org> | 2010-07-01 02:42:29 +0800 |
commit | 25b44a5e49082ae6c4543a0261a382907350efd2 (patch) | |
tree | c94db69f599bb302321813b5130b1932f9cc50b3 /x11/slim | |
parent | 3f719c0411e992762cca592fcda70cb191bbd192 (diff) | |
download | freebsd-ports-gnome-25b44a5e49082ae6c4543a0261a382907350efd2.tar.gz freebsd-ports-gnome-25b44a5e49082ae6c4543a0261a382907350efd2.tar.zst freebsd-ports-gnome-25b44a5e49082ae6c4543a0261a382907350efd2.zip |
- Add patch from upstream to fix crash on SIGTERM
- Bump PORTREVISION
PR: ports/148258
Submitted by: myself
Approved by: Henry Hu <henry.hu.sh AT gmail.com> (maintainer), beat (co-mentor)
Obtained from: http://svn.berlios.de/wsvn/slim/?rev=169
Feature safe: yes
Diffstat (limited to 'x11/slim')
-rw-r--r-- | x11/slim/Makefile | 2 | ||||
-rw-r--r-- | x11/slim/files/patch-002-fix-shutdown | 65 |
2 files changed, 66 insertions, 1 deletions
diff --git a/x11/slim/Makefile b/x11/slim/Makefile index 22370b94b541..7c09c16a8157 100644 --- a/x11/slim/Makefile +++ b/x11/slim/Makefile @@ -7,7 +7,7 @@ PORTNAME= slim PORTVERSION= 1.3.1 -PORTREVISION= 8 +PORTREVISION= 9 CATEGORIES= x11 MASTER_SITES= ${MASTER_SITE_BERLIOS} \ http://depot.fsck.ch/mirror/distfiles/ diff --git a/x11/slim/files/patch-002-fix-shutdown b/x11/slim/files/patch-002-fix-shutdown new file mode 100644 index 000000000000..f2e27060844d --- /dev/null +++ b/x11/slim/files/patch-002-fix-shutdown @@ -0,0 +1,65 @@ +------------------------------------------------------------------------ +r169 | iwamatsu | 2009-11-14 09:13:57 +0100 (Sat, 14 Nov 2009) | 11 lines + +Add flag of server check + +Slim gets this SIGTERM, and its signal handler calls +CloseServer() to teardown X. But X is not yet started (as StartServer() +is still running in another thread, waiting in pause()), and hence this +calls XcloseDisplay which frees some resources which are not yet allocated. + +This parch fix this problem. +Thanks, Landry Breuil, goebbels, jasper and OpenBSD Developer. + +Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> +------------------------------------------------------------------------ +--- app.h (revision 168) ++++ app.h (revision 169) +@@ -36,6 +36,7 @@ + int GetServerPID(); + void StopServer(); + ++ bool serverStarted; + // Lock functions + void GetLock(); + void RemoveLock(); +--- app.cpp (revision 168) ++++ app.cpp (revision 169) +@@ -105,7 +105,10 @@ + + void CatchSignal(int sig) { + cerr << APPNAME << ": unexpected signal " << sig << endl; +- LoginApp->StopServer(); ++ ++ if (LoginApp->serverStarted) ++ LoginApp->StopServer(); ++ + LoginApp->RemoveLock(); + exit(ERR_EXIT); + } +@@ -140,6 +143,7 @@ + int tmp; + ServerPID = -1; + testing = false; ++ serverStarted = false; + mcookie = string(App::mcookiesize, 'a'); + daemonmode = false; + force_nodaemon = false; +@@ -860,6 +864,8 @@ + char* args = new char[argOption.length()+2]; // NULL plus vt + strcpy(args, argOption.c_str()); + ++ serverStarted = false; ++ + int argc = 1; + int pos = 0; + bool hasVtSet = false; +@@ -940,6 +946,8 @@ + + delete args; + ++ serverStarted = true; ++ + return ServerPID; + } + |