I know that tsocks is not currently thread safe (through both the documentation and experience of my program crashing!). What would it take to make the program safe for threaded use? I experimented by creating mutexes and making write (and some reads) to certain global variables, including the structs that track each connection, atomic via the pthread_lock_mutex. It did not work. I do not have much experience with making libraries thread-safe after they've been built otherwise. Does anyone have any input? I'd love to finally make tsocks thread safe so that we can expand it's usefulness to other programs.
On another note, I did notice that tsocks causes the particular program I am socksifying to crash only after a relatively long (relative to, say, the Dante library) period of time. I was surprised how quickly Dante caused my program to crash. It was almost immediate! Dante is supposedly thread-safe, but my tests blew that statement out of the water.
Anyways, any help would be appreciated. And to the programmers: there are still a lot of people using and actively modifying your library! You should add some new functionality and release a new version :-).
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.