How to implement a driver's read and write operations with synchronization properly

Valdis.Kletnieks at vt.edu Valdis.Kletnieks at vt.edu
Tue Jul 29 10:24:41 EDT 2014


On Tue, 29 Jul 2014 20:59:08 +0700, Anh Le said:

> still, user programs like bash could have a race problem by spliting
> the input, I hope that they can somehow take care of this problem
> themselves.

stdio is *not* always your friend.  fopen/fprintf is prone to splitting on
bugger boundaries without your knowing about it, but most language bindings
(including the Perl you tested with) allow you to use open/write and do the
buffer management yourself

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140729/d3e06d04/attachment.bin 


More information about the Kernelnewbies mailing list