XP Serial port control

C

cubscout

I am trying to use the serial port from perl, but I need O_NONBLOCK. I
thought I had this working on Win2k, but on XP I get: "vendor has not
defined Fcntl macro O_NONBLOCK". I've tried other various methods such
as IO::Select (which does not work), and I tried Serialport.pm which
predates XP! Anyone have suggestions for XP? I'm stuck! How can I
not block with a serial port?
 
S

Sisyphus

Samwyse said:
..
..

If you are doing anything fancy, Unix-isms don't work well in Win32.
Look at I/O Completion Ports on these two pages:

http://www.sysinternals.com/Information/IoCompletionPorts.html

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndllpro/html/msdn_scalabil.asp

No, I don't know how to relate all of this information to Perl.

One could access that functionality from perl using either Inline::C or
Win32::API.

My impression from the op's first post is that there was no problem with
Windows2000. So I was going to suggest that the op try and dig up that
code - because I feel that if it worked on 2k, then it should work on XP
with little or no modification. I could, of course, be wrong about that -
however I find that O_NONBLOCK is also *not* a defined macro on my
Windows2000 box. (Or - perhaps it *is* defined under Cygwin ... if the op
wants to go down that path.)

Cheers,
Rob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top