return error codes from syscalls