Nonblocking serial ports
Yaakov (Cygwin/X)
yselkowitz@users.sourceforge.net
Mon Jun 14 05:59:00 GMT 2010
I came across this while working on getting my Palm to hook up to
gnome-pilot over Bluetooth. COM3 is an incoming COM Port created within
Bluetooth Settings, although the STC has the same results on COM1 (a
standard serial port).
Unlike pilot-link's tools and jpilot (all three use pilot-link's
libpisock under the hood), gnome-pilot open()s a serial port with
O_NONBLOCK when first started in order to initialize a GIOChannel, then
later pi_bind()s a different fd pointing to the same port. Works great
on Linux, but on Cygwin the latter call fails, as the serial port is
already blocked by the first open() call. FWIW, both pilot-xfer and
friends and jpilot work fine over the Bluetooth serial port, and all
three work over the network.
Attached is a STC. On Linux, this succeeds, but on Cygwin (both 1.7.5
and latest snapshot), it fails:
second open(/dev/ttyS2) failed: Permission denied
HTH,
Yaakov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.c
Type: text/x-csrc
Size: 477 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20100614/30b2c3ea/attachment.bin>
-------------- next part --------------
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list