From cf02e61c441d38e1eea04df5168aab7aee13f88f Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Tue, 30 Apr 2024 13:41:36 +0200 Subject: pkg/ipc: consistently set ENOSYS for non-executed syscalls Currently we set errno=999 in executor for non-finished syscalls, but syscalls that were not even started still have errno=0. They also don't have Executed flag, but it's still handy to have a non-0 errno when the call is not successful. --- executor/executor.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'executor') diff --git a/executor/executor.cc b/executor/executor.cc index c5bd43f7b..92b344e56 100644 --- a/executor/executor.cc +++ b/executor/executor.cc @@ -1114,7 +1114,7 @@ void copyout_call_results(thread_t* th) void write_call_output(thread_t* th, bool finished) { - uint32 reserrno = 999; + uint32 reserrno = ENOSYS; const bool blocked = finished && th != last_scheduled; uint32 call_flags = call_flag_executed | (blocked ? call_flag_blocked : 0); if (finished) { -- cgit mrf-deployment