Bruno Haible wrote:
What if the .exe has another name?
What other names are in common use for this program?
No sure. I'll need to check the MinGW-w64 list and motive.
Some custom variation of it perhaps?
The purpose of your function looks similar to what Mihail Konev
did for the MinGW-w64 project:
https://mingw-w64-public.narkive.com/s7kYRrtG/patch-mingw-w64-add-include-iscygtty-c
Instead he looked for pipes matching:
"\Device\NamedPipe\(cygwin|msys)-[a-fA-F0-9]{16}-pty[0-9]{1,4}-(from-master|to-master|to-master-cyg)"
I prefer to avoid the ntdll.dll API when possible.
Okay, what's wrong with that?
--
--gv