File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -99,6 +99,7 @@ PostPatchFn PatchSchedSetaffinity(PrePatchArgs args) {
9999 warn (" SYS_sched_getaffinity cannot find thread with OS id %u, ignored!" , linuxTid);
100100 PIN_SetSyscallNumber (args.ctxt , args.std , (ADDRINT) SYS_getpid); // squash
101101 return [](PostPatchArgs args) {
102+ PIN_SetSyscallNumber (args.ctxt , args.std , (ADDRINT)-EPERM);
102103 return PPA_NOTHING;
103104 };
104105 }
@@ -114,6 +115,7 @@ PostPatchFn PatchSchedSetaffinity(PrePatchArgs args) {
114115 }
115116 PIN_SetSyscallNumber (args.ctxt , args.std , (ADDRINT) SYS_getpid); // squash
116117 return [](PostPatchArgs args) {
118+ PIN_SetSyscallNumber (args.ctxt , args.std , (ADDRINT)0 ); // return 0 on success
117119 return PPA_USE_JOIN_PTRS;
118120 };
119121}
You can’t perform that action at this time.
0 commit comments