From: Christian B. <Chr...@un...> - 2002-05-07 15:52:15
|
Hi! On 2002.05.06 20:11 Brian Johnson wrote: > Just put a pipe character ("|") at the beginning of the port device > file name, and BII will allocate a pseudoterminal, connect the master > side to the BII serial infrastructure, and run the rest of the port > device file name as a program using "/bin/sh -c", with the slave side > of the pty as its standard input, output, and error. That's cool. When I wrote the TODO entry, I only had something simple with popen() in mind... :-) This might actually work on BeOS, too. > - How should BII call wait() to clean up after the subprocess exits? > From the serial port close handler? From a separate pthread (so it > can block)? From SERDPort::close(), I think. > - Should I automatically drop privileges in the subprocess if BII is > running setuid? What's the philosophy for making BII > security-conscious vs. just documenting the issues and saying, "if > you install BII as setuid, you do so at your own risk"? "Dropping privileges"? "Security philosophy"? Um... ;-) > - Is the current code structure OK, or would you prefer that I move > the PTY setup/fork/exec/etc. into a subroutine? This might make it more readable. > I also added a hook for midi support: if the device name is "midi", > it's treated specially (returns an error for now). I have no idea if > Mac MIDI drivers actually use the serial manager, or if this is the > best way to add MIDI to BasiliskII. Apple's original (and long obsolete) MIDI driver poked the hardware directly. I'm not sure about QuickTime and OMS (and there's one other Mac MIDI API whose name escapes me at the moment). They probably do the same. This needs further research... Bye, Christian -- / Coding on PowerPC and proud of it \/ http://www.uni-mainz.de/~bauec002/ |