Dr. Werner Fink 2012-01-24 16:09:02 +00:00 committed by Git OBS Bridge
parent 87a6c710e0
commit 8ac42a6f64
2 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Jan 24 16:06:20 UTC 2012 - werner@suse.de
- Make sigexec using a contolling terminal
-------------------------------------------------------------------
Mon Jan 23 12:53:26 UTC 2012 - werner@suse.de

View File

@ -97,10 +97,15 @@ int main(int argc, char* argv[])
switch ((pid = fork())) {
case 0:
ioctl(1, TIOCNOTTY);
if (setsid() < 0)
perror("pty: can not get controlling tty");
dup2(pts, 1);
dup2(pts, 2);
close(pts);
close(ptm);
if (ioctl (1, TIOCSCTTY, 1) < 0)
perror("pty: can not get controlling tty");
break;
case -1:
close(pts);