This makes task of writing dialout programs on interpreted languages more complicated
Modemtcl is a special tcl interpreter (really startup program which uses libtclX.X.so) which can be installed SUID or SGID. It does give up special rights immediately after startup, before reading any startup scripts, and uses them only when special openmodem command is invoked.
This command opens specified device and creates proper UUCP-style lockfile. IT returns usial tcl channel identifier.
Really there also should be some interface to tcgetattr/tcsetattr C functions, for instance something like expect's stty command. But I haven't found time to write it. So you have only options provided by standard Tcl fconfigure command at your disposal.
Download: modemtcl-0.1.tar.gz