Sign in to follow this  
Followers 0


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) {
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) {
execlp("/bin/ksh", "ksh", (char *)0);
... do master stuff

I don't get it yet.

Edited by SigFLUP

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