LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-08-2010, 10:40 PM   #1
jim.yefeng
LQ Newbie
 
Registered: Jun 2010
Posts: 6

Rep: Reputation: 0
write() syscall hangs up


I had a problem that my write() syscall hangs up.
The write is writing data to a file descriptor which is a slave pty.

The write executed inside a loop.
After writing some times. Then it hangs up.
 
Old 06-08-2010, 10:42 PM   #2
jim.yefeng
LQ Newbie
 
Registered: Jun 2010
Posts: 6

Original Poster
Rep: Reputation: 0
The codes looks like,
102 for(countBytes = 0; countBytes < readBytes; countBytes +=
wroteBytes)
103 {
104 wroteBytes = write(writeFd, readBuffer+countBytes, readBytes -
countBytes);
105
106 // If the other side closed, don't bother trying to finish

The writeFd is a descriptor which is associated with a slave pty.
It can runs ok several times. but then hangs up.

Could someone help me? thx anyway!
 
  


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
Modifying syscall.c HSN Programming 3 09-24-2009 09:52 PM
vfork syscall bandaru_sivakrishna Linux - Software 3 07-13-2009 11:21 PM
i need help in understanding syscall tonyr81 Linux - Kernel 4 05-27-2008 05:18 PM
NFS client hangs when write ziobudda Linux - Networking 5 04-14-2006 10:40 PM
OS hangs on write attempt to DDS-2 changer dguy Linux - Software 7 02-23-2006 05:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:07 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
Open Source Consulting | Domain Registration