fixed bug where cdev_write is non-responsive to signals