LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-02-2009, 05:47 AM   #1
max1232
LQ Newbie
 
Registered: Mar 2009
Posts: 5

Rep: Reputation: 0
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??
 
Old 03-03-2009, 01:19 AM   #2
max1232
LQ Newbie
 
Registered: Mar 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Somebody please help me to figure out what is wrong
 
Old 03-04-2009, 02:08 AM   #3
max1232
LQ Newbie
 
Registered: Mar 2009
Posts: 5

Original Poster
Rep: Reputation: 0
I also noticed taht if I stop the master process , then the slave is rerading all the sent data. Any thoughts why this is happening?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Raid disk problem : Attempt to read block from filesystem resulted in short read ElmPie Linux - General 5 08-26-2008 06:21 AM
Read Evolution Mail from Slave HDD flatstan Linux - Software 2 04-15-2008 04:15 PM
Can a Windows primary access files from a non-ntfs/fat (read: linux) slave? RpgActioN General 6 06-13-2007 06:02 AM
How to get SUSE installation DVD to read from secondary slave DVD drive. Kippax Linux - Hardware 3 06-09-2007 11:37 PM
Slave drive problem Damien_III Linux - Hardware 2 04-08-2005 02:57 AM


All times are GMT -5. The time now is 10:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration