Merge stil
authorStiletto <blasux@blasux.ru>
Sun, 12 May 2013 19:15:15 +0400
branchstil
changeset 1538 6718f0ba24fd
parent 1537 c7a2261b5414 (diff)
parent 1536 932900ff8dbb (current diff)
child 1540 e8a43c5bbc46
Merge
dwm.c
--- a/dwm.c	Sat May 11 00:22:55 2013 +0400
+++ b/dwm.c	Sun May 12 19:15:15 2013 +0400
@@ -28,6 +28,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#include <sys/mman.h>
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <X11/cursorfont.h>
@@ -1598,6 +1599,8 @@
 		if(dpy)
 			close(ConnectionNumber(dpy));
 		setsid();
+		if (munlockall())
+		    perror("munlockall()");
 		execvp(((char **)arg->v)[0], (char **)arg->v);
 		fprintf(stderr, "dwm: execvp %s", ((char **)arg->v)[0]);
 		perror(" failed");
@@ -2086,6 +2089,8 @@
 		fputs("warning: no locale support\n", stderr);
 	if(!(dpy = XOpenDisplay(NULL)))
 		die("dwm: cannot open display\n");
+	if (mlockall(MCL_CURRENT | MCL_FUTURE))
+		perror("mlockall()");
 	checkotherwm();
 	setup();
 	scan();