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