Support X_TRUNCATE operation and various bug fixes

Support X_TRUNCATE operation.

Fix bug in return value.

Fix buffer overflow in posixfd_init_signal_desc.