Home
Support

Knowledge Base

BSPs and drivers
Community resources
Product documentation
Questions?
Contact us

Write to devc-pty blocks unexpectedly
 
________________________________________________________________________

Applicable Environment
________________________________________________________________________
  • Topic: Write to devc-pty blocks unexpectedly
  • SDP: 6.3.2
  • Target: Any supported target
________________________________________________________________________

Solution
________________________________________________________________________

Writing more than 200 bytes of data to devc-pty on 6.3.x is a problem as there is a hard coded buffer in the write() implementation that is limited to 200 bytes. The workaround is below:

pipeFlags = (U32)fcntl(pyp->descriptors[0], F_GETFL);
pipeFlags |= O_NONBLOCK;
(void)fcntl(pyp->descriptors[0], F_SETFL, pipeFlags);

Results:
if length is greater than 200, the write call returns 200, remainder can be written on subsequent attempt

Note that for 6.4, this has been changed and is no longer a restriction.

________________________________________________________________________
NOTE: This entry has been validated against the SDP version listed above. Use caution when considering this advice for any other SDP version. For supported releases, please reach out to QNX Technical Support if you have any questions/concerns.
________________________________________________________________________


Related Attachments
 None Found





Please contact us with your questions or concerns.