<i>Avoid double-open of serial ports on Windows</i> status still Open with 4 other changes
by
.
D 2008-12-11T21:42:32
J icomment The\sfollowing\spatch\sperformes\sa\s"name\shint"\sto\sdetect\snative\sWindows\sserial\sport\sname\sby\sone\sof\sthe\sfollowing\spatterns\s(case-insensitive).\sPattern\smatching\sis\schecked\squite\srestrictive,\sbecause\s*all\sopen-filenames*\sneed\sto\spass\sthis\stest.\n\nCOM[1-9]:?\n\\\\.\\COM[0-9]+\n//./COM[0-9]+\n\nFor\sall\sfilenames\snot\smatching\sthe\spatterns\sabove,\sthe\soriginal\sbehavior\sopen-close-reopen\sis\spreserved,\sthus\ssupporting\s(virtual)\scomports\sof\sany\sother\sname:\n1.\sOpen\schannel\swith\sNON-OVERLAPPED\sflag\n2.\sDetect\sserial\sport\sby\schecking\sGetCommState()\sresult\n3.\sReopen\sthe\sserial\sport\swith\sOVERLAPPED\sflag\nThis\sbehavior\scan\sbe\senforced\seven\sfor\snative\sWindows\sserial\sports\se.g.\swith\s\n\n[open\s/com1\sr+]\n
J login schroedter
J mimetype text/plain
J username schroedter
K 2413550fffffffffffffffffffffffffffffffff
U schroedter
Z 9906be95ec3c1ffcd575981a0611dfd0