summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--extra/slim/.md5sum2
-rw-r--r--extra/slim/Pkgfile9
-rw-r--r--extra/slim/slim-restart.patch141
-rw-r--r--extra/slim/slim-tty-slowness.patch29
4 files changed, 178 insertions, 3 deletions
diff --git a/extra/slim/.md5sum b/extra/slim/.md5sum
index 85e57bef1..7f511d8cf 100644
--- a/extra/slim/.md5sum
+++ b/extra/slim/.md5sum
@@ -1,6 +1,8 @@
87a3a022fa1d6dfe460c2989de1da5db gcc44.patch
f7e9ef62e3d4c8e3e85865c0a169fc5f slim
727d0acb24c0fbf0751134c37a9c895f slim-1.3.1.tar.gz
+648d871fe7d2a97b7d7b928019e2feee slim-restart.patch
+be48f19a2e2f154bed750171e8d0fc7f slim-tty-slowness.patch
d0c5fd4f91c385cc23c35f981ac2c695 slim.conf
fdfe21bf4e734d7bdcdcd827b7e13585 slimnutyx-2009.2.tar.gz
9143a67ce78ca11a7e811138859ad54f stdlib.patch
diff --git a/extra/slim/Pkgfile b/extra/slim/Pkgfile
index c76a136e7..a7d97d0f4 100644
--- a/extra/slim/Pkgfile
+++ b/extra/slim/Pkgfile
@@ -6,15 +6,18 @@
name=slim
version=1.3.1
-release=3
+release=4
source=(http://download.berlios.de/$name/$name-$version.tar.gz\
http://kiao.no-ip.info/NuTyX/files/slimnutyx-2009.2.tar.gz
- stdlib.patch xinitrc gcc44.patch \
- slim slim.conf )
+ stdlib.patch xinitrc gcc44.patch slim-restart.patch\
+ slim slim.conf slim-tty-slowness.patch)
build() {
cd $name-$version
+ patch -Np1 -i ../slim-tty-slowness.patch
patch -Np1 -i ../gcc44.patch
+ patch -Np1 -i ../slim-restart.patch
+ sed -i -e 's/png12/png14/g' Makefile
make
sed -i "s|/usr/X11R6/include|/usr/include/xorg|g" slim.conf
sed -i "s|/usr/X11R6/|/usr/|g" slim.conf
diff --git a/extra/slim/slim-restart.patch b/extra/slim/slim-restart.patch
new file mode 100644
index 000000000..1f9c02dff
--- /dev/null
+++ b/extra/slim/slim-restart.patch
@@ -0,0 +1,141 @@
+diff -ur slim-1.3.1.orig/app.cpp slim-1.3.1/app.cpp
+--- slim-1.3.1.orig/app.cpp 2008-09-26 02:54:15.000000000 +0200
++++ slim-1.3.1/app.cpp 2008-11-21 20:38:48.000000000 +0100
+@@ -102,6 +102,11 @@
+
+ extern App* LoginApp;
+
++int xioerror(Display *disp) {
++ LoginApp->RestartServer();
++ return 0;
++}
++
+ void CatchSignal(int sig) {
+ cerr << APPNAME << ": unexpected signal " << sig << endl;
+ LoginApp->StopServer();
+@@ -109,19 +114,6 @@
+ exit(ERR_EXIT);
+ }
+
+-
+-void AlarmSignal(int sig) {
+- int pid = LoginApp->GetServerPID();
+- if(waitpid(pid, NULL, WNOHANG) == pid) {
+- LoginApp->StopServer();
+- LoginApp->RemoveLock();
+- exit(OK_EXIT);
+- }
+- signal(sig, AlarmSignal);
+- alarm(2);
+-}
+-
+-
+ void User1Signal(int sig) {
+ signal(sig, User1Signal);
+ }
+@@ -267,7 +259,6 @@
+ signal(SIGHUP, CatchSignal);
+ signal(SIGPIPE, CatchSignal);
+ signal(SIGUSR1, User1Signal);
+- signal(SIGALRM, AlarmSignal);
+
+ #ifndef XNEST_DEBUG
+ OpenLog();
+@@ -287,7 +278,6 @@
+
+ CreateServerAuth();
+ StartServer();
+- alarm(2);
+ #endif
+
+ }
+@@ -603,6 +593,8 @@
+ int status;
+ while (wpid != pid) {
+ wpid = wait(&status);
++ if (wpid == ServerPID)
++ xioerror(Dpy); // Server died, simulate IO error
+ }
+ if (WIFEXITED(status) && WEXITSTATUS(status)) {
+ LoginPanel->Message("Failed to execute login command");
+@@ -648,9 +640,6 @@
+
+
+ void App::Reboot() {
+- // Stop alarm clock
+- alarm(0);
+-
+ #ifdef USE_PAM
+ try{
+ pam.end();
+@@ -673,9 +662,6 @@
+
+
+ void App::Halt() {
+- // Stop alarm clock
+- alarm(0);
+-
+ #ifdef USE_PAM
+ try{
+ pam.end();
+@@ -761,6 +747,7 @@
+
+ StopServer();
+ RemoveLock();
++ while (waitpid(-1, NULL, WNOHANG) > 0); // Collects all dead childrens
+ Run();
+ }
+
+@@ -831,6 +818,7 @@
+
+ for(cycles = 0; cycles < ncycles; cycles++) {
+ if((Dpy = XOpenDisplay(DisplayName))) {
++ XSetIOErrorHandler(xioerror);
+ return 1;
+ } else {
+ if(!ServerTimeout(1, (char *) "X server to begin accepting connections"))
+@@ -913,9 +901,6 @@
+ ServerPID = -1;
+ break;
+ }
+- alarm(15);
+- pause();
+- alarm(0);
+
+ // Wait for server to start up
+ if(WaitForServer() == 0) {
+@@ -948,15 +933,12 @@
+
+
+ void App::StopServer() {
+- // Stop alars clock and ignore signals
+- alarm(0);
+ signal(SIGQUIT, SIG_IGN);
+ signal(SIGINT, SIG_IGN);
+ signal(SIGHUP, SIG_IGN);
+ signal(SIGPIPE, SIG_IGN);
+ signal(SIGTERM, SIG_DFL);
+ signal(SIGKILL, SIG_DFL);
+- signal(SIGALRM, SIG_DFL);
+
+ // Catch X error
+ XSetIOErrorHandler(IgnoreXIO);
+diff -ur slim-1.3.1.orig/app.h slim-1.3.1/app.h
+--- slim-1.3.1.orig/app.h 2008-09-26 02:54:15.000000000 +0200
++++ slim-1.3.1/app.h 2008-11-21 20:38:48.000000000 +0100
+@@ -34,6 +34,7 @@
+ ~App();
+ void Run();
+ int GetServerPID();
++ void RestartServer();
+ void StopServer();
+
+ // Lock functions
+@@ -48,7 +49,6 @@
+ void Console();
+ void Exit();
+ void KillAllClients(Bool top);
+- void RestartServer();
+ void ReadConfig();
+ void OpenLog();
+ void CloseLog();
diff --git a/extra/slim/slim-tty-slowness.patch b/extra/slim/slim-tty-slowness.patch
new file mode 100644
index 000000000..1f1f2e166
--- /dev/null
+++ b/extra/slim/slim-tty-slowness.patch
@@ -0,0 +1,29 @@
+--- slim-1.3.1.orig/app.cpp 2009-01-13 11:30:36.000000000 +0900
++++ slim-1.3.1/app.cpp 2009-01-13 11:32:27.000000000 +0900
+@@ -270,21 +270,22 @@
+ signal(SIGALRM, AlarmSignal);
+
+ #ifndef XNEST_DEBUG
+- OpenLog();
+-
+ if (!force_nodaemon && cfg->getOption("daemon") == "yes") {
+ daemonmode = true;
+ }
+
+ // Daemonize
+ if (daemonmode) {
+- if (daemon(0, 1) == -1) {
++ if (daemon(0, 0) == -1) {
+ cerr << APPNAME << ": " << strerror(errno) << endl;
+ exit(ERR_EXIT);
+ }
+- UpdatePid();
+ }
+
++ OpenLog();
++
++ if (daemonmode) UpdatePid();
++
+ CreateServerAuth();
+ StartServer();
+ alarm(2);