Use global mutexattr and condattr
Actually send the proper file descriptors

I blame C for this.