Jump to content


Photo
- - - - -

sigio


  • Please log in to reply
No replies to this topic

#1 SigFLUP

SigFLUP

    SUPR3M3 31337 Mack Daddy P1MP

  • Members
  • 367 posts
  • Gender:Not Telling

Posted 05 March 2010 - 09:58 PM

Seems I'm catching sigio on the master terminal io and not slave io. Any ideas why? I want the parent process to handle characters coming out of the child with function "io"

if(openpty(&master, &slave, slave_name, &term.conf, &term.ws_conf)<0) { 
 perror("openpty");
 exit(0);
}
printf("pty: %s\n", slave_name);
signal(SIGIO, io);
fcntl(master, F_SETFL, fcntl(master, F_GETFL,0)|O_ASYNC|O_NONBLOCK);
if(fork() == 0) {
 login_tty(slave);
 execlp("/bin/ksh", "ksh", (char *)0);
}
... do master stuff


I don't get it yet.

Edited by SigFLUP, 05 March 2010 - 09:58 PM.





BinRev is hosted by the great people at Lunarpages!