为什么 strace 显示 syscall =?

Ram*_*ikh 2 linux c kernel system-calls strace

我进行了系统调用并重新编译了内核,但是在运行系统调用时它返回了 Killed。因此,为了跟踪它,我使用了 strace,它显示了以下消息: syscall_0x224(0x7ffda7199738, 0x7ffda7199748, 0x55743750a6d0, 0x7f9f20df7d80, 0x7f9f20df7d80, 0x7ffda7199730) = ?

这是什么意思(不是十六进制,问号)?

mur*_*uru 6

这意味着系统调用已终止,并且没有(不能)返回值。一个例子中给出strace手册

Interruption of a (restartable) system call by a signal delivery is
processed differently as kernel terminates the system call and also
arranges its immediate reexecution after the signal handler
completes.

   read(0, 0x7ffff72cf5cf, 1)     = ? ERESTARTSYS (To be restarted)
Run Code Online (Sandbox Code Playgroud)

看起来,就像您的系统调用一样,read此处已终止,并且没有返回值。(与您的系统调用不同,read这里被安排重新执行。)

其他不返回的系统调用(例如,exit_group)也显示?

~ strace -e exit_group /bin/true
exit_group(0)                           = ?
+++ exited with 0 +++
Run Code Online (Sandbox Code Playgroud)