PsuedoTerminal problem cannot read from slave
Hi,
I am facing some problems in reading from slave fd. I am openig a psuedoterminal devioce from my process A and I am doing grant and unlock functions and calling getptsname on masterfd and spwaning a new process B with ptsname as commandline.
In process B , I am doing
ttyfd = open(Options.DeviceName,O_RDWR|O_NOCTTY);
FD_ZERO(&ReadSet);
FD_ZERO(&WriteSet);
FD_SET(ttyfd,&ReadSet);
FD_CLR(ttyfd,&WriteSet);
for( ; ; )
{
SIMLOG(NOTIFY,"Going to wait for select");
if( ( nSelReturn = select(ttyfd+1,&ReadSet,&WriteSet,NULL,NULL) ) < 0 )
I am weriting data from Processs A but Proces B is still waiting on select. Why is data not reaching the slave fd??
|