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


  Search this Thread
Old 06-08-2010, 10:40 PM   #1
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
LQ Newbie
Registered: Jun 2010
Posts: 6

Original Poster
Rep: Reputation: 0
The codes looks like,
102 for(countBytes = 0; countBytes < readBytes; countBytes +=
103 {
104 wroteBytes = write(writeFd, readBuffer+countBytes, readBytes -
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!


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

All times are GMT -5. The time now is 03:47 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