[Twisted-Python] twistd and serial port access

Eugene Coetzee projects at reedflute.com
Tue Nov 16 13:38:22 MST 2004


Hi everyone,

I'm stumped by  the following  problem with  using pyserial from  within 
twistd.

(assuming I'm invoking twistd from the cmd line as uid=1000  gid=100 and 
I'm using pyserial to connect to /dev/ttyS01 which have permissions 666, 
owner 'root', grp 'uucp' )

In myserialapp.py I have created an application object (I want the 
daemon to run as uid 1000):
 
application=service.Application('serial',uid=1000,gid=100)

When I run :
twistd  -ny myserialapp.py >/dev/null  &

- no problem whatsover.

BUT when I run:

twistd -y myserialapp.py

- pyserial squeels about the serialport "not being a valid file descriptor."

I'm convinced that it has someting to do with permissions when twistd 
enters daemon mode - but what and how do I fix that?

regards,

Eugene Coetzee


Web                 -> www.reedflute.com
=============================================== 






More information about the Twisted-Python mailing list