Somehow, konsole is not coming up in a sane signal environment.

Work around it by restoring sig child handler to a sane value
temporarily.
This commit is contained in:
espie 2000-10-20 20:11:40 +00:00
parent f88b922882
commit c337fbc3c6

View File

@ -0,0 +1,25 @@
--- konsole/src/TEPty.C.orig Fri Oct 20 21:57:06 2000
+++ konsole/src/TEPty.C Fri Oct 20 22:04:22 2000
@@ -180,9 +180,14 @@ int chownpty(int fd, int grant)
// param grant: 1 to grant, 0 to revoke
// returns 1 on success 0 on fail
{
+// XXX
+ struct sigaction oact;
+ sigaction(SIGCHLD, NULL, &oact);
+ signal(SIGCHLD, SIG_DFL);
pid_t pid = fork();
if (pid < 0)
{
+ sigaction(SIGCHLD, &oact, NULL);
return 0;
}
if (pid == 0)
@@ -199,6 +204,7 @@ int chownpty(int fd, int grant)
int rc = waitpid (pid, &w, 0);
if ((rc == -1) && (errno == EINTR))
goto retry;
+ sigaction(SIGCHLD, &oact, NULL);
return (rc != -1 && WIFEXITED(w) && WEXITSTATUS(w) == 0);
}
return 0; //dummy.