Solaris: various repairs

Fix threading, including SIGCHLD mask.