Closed vinoski closed 11 years ago
Looks good to me. Testing it in a production environment, hehe
Hello, I tested this pull request. Works for me using R16B on a 64bit linux machine. Please pull it. Thx.
Can we just remove the gen_server entirely now?
The gen_server still loads the port driver.
Could we just load/unload the port driver in application start/stop, though?
Sure, you can move it. I didn't want to try to do something like that without your input.
With R16B changes related to locking within the area of port drivers seemed to result in the syslog driver hanging on the driver_create_port call. To avoid this, move port creation and closing from C into Erlang. Rework the driver control interface to simplify the open call to just the setting of the logopt and facility on a new port. Remove the opening and closing of a port in the gen_server init and terminate as that port is no longer needed to communicate with the driver. Move the open call out of the gen_server and do it in the caller's process instead.