Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


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

Rep: Reputation: 0
PsuedoTerminal problem cannot read from slave


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);

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
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
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?


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 > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:17 PM.

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