File ksh93-builtin.dif of Package ksh

--- src/cmd/builtin/pty.c
+++ src/cmd/builtin/pty.c	2012-02-13 13:35:02.577933517 +0000
@@ -215,6 +215,12 @@ mkpty(int* master, int* slave)
 #if !_lib_openpty
 	char*		sname;
 #endif
+#ifdef __linux__
+	sigset_t blckttou, oldset;
+	(void)sigemptyset(&blckttou);
+	(void)sigaddset(&blckttou, SIGTTOU);
+	sigprocmask(SIG_BLOCK, &blckttou, &oldset);
+#endif
 	/*
 	 * some systems hang hard during the handshake
 	 * if you know why then please let us know
@@ -237,6 +243,12 @@ mkpty(int* master, int* slave)
 		error(-1, "unable to get standard error window size");
 	}
 #endif
+#ifdef __linux__
+# if !_lib_openpty
+#  undef  _lib_openpty
+#  define _lib_openpty 1
+# endif
+#endif
 #if _lib_openpty
 	if (openpty(master, slave, NULL, ttyp, winp) < 0)
 		return -1;
@@ -276,6 +288,9 @@ mkpty(int* master, int* slave)
 #endif
 	fcntl(*master, F_SETFD, FD_CLOEXEC);
 	fcntl(*slave, F_SETFD, FD_CLOEXEC);
+#ifdef __linux__
+	sigprocmask(SIG_SETMASK, &oldset, NULL);
+#endif
 	alarm(0);
 	return 0;
 }
--- src/cmd/builtin/what.c
+++ src/cmd/builtin/what.c	2012-02-13 11:02:18.645933606 +0000
@@ -68,7 +68,7 @@ static struct
 	int		match;
 	int		single;
 	size_t		skip[UCHAR_MAX+1];
-	unsigned char	prev[3];
+	unsigned char	prev[4];
 } state;
 
 static void
@@ -99,7 +99,7 @@ what(const char* file, Sfio_t* ip, Sfio_
 			{
 			next:
 				s = state.prev;
-				s[0] = s[1] = s[2] = 0;
+				s[0] = s[1] = s[2] = s[3] = 0;
 				switch (mid)
 				{
 				default:
openSUSE Build Service is sponsored by