diff options
| -rw-r--r-- | executor/executor.cc | 2 | ||||
| -rw-r--r-- | pkg/ipc/ipc.go | 7 |
2 files changed, 8 insertions, 1 deletions
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) { diff --git a/pkg/ipc/ipc.go b/pkg/ipc/ipc.go index 818c88a84..6185a6181 100644 --- a/pkg/ipc/ipc.go +++ b/pkg/ipc/ipc.go @@ -12,6 +12,7 @@ import ( "slices" "strings" "sync" + "syscall" "time" "unsafe" @@ -382,6 +383,12 @@ func (env *Env) parseOutput(opts *ExecOpts, ncalls int) (*ProgInfo, error) { return nil, fmt.Errorf("failed to read number of calls") } info := &ProgInfo{Calls: make([]CallInfo, ncalls)} + for i := range info.Calls { + // Store some unsuccessful errno in the case we won't get any result. + // It also won't have CallExecuted flag, but it's handy to make it + // look failed based on errno as well. + info.Calls[i].Errno = int(syscall.ENOSYS) + } extraParts := make([]CallInfo, 0) for i := uint32(0); i < ncmd; i++ { if len(out) < int(unsafe.Sizeof(callReply{})) { |
