Sign in to follow this  
Followers 0
SigFLUP

sigio

1 post in this topic

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
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0