wgss: Added a hack (b647a3a1...) that makes sure the system lock is released when the thread terminates. This avoids deadlocks at process termination leading to hanging non-killable zombie processes, which is especially frequent on SMP systems.