c337fbc3c6
Work around it by restoring sig child handler to a sane value temporarily.
26 lines
729 B
Plaintext
26 lines
729 B
Plaintext
--- 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.
|