diff --git a/kernel/syscall/processctl.c b/kernel/syscall/processctl.c index 3073c53..af67751 100644 --- a/kernel/syscall/processctl.c +++ b/kernel/syscall/processctl.c @@ -6,14 +6,12 @@ #include "util/util.h" #include "sysdefs/processctl.h" -#define PID_SELF_MAGIC 0x5E1F - int32_t SYSCALL3(sys_processctl, pid1, cmd1, optsptr1) { uint64_t pid = pid1; uint64_t cmd = cmd1; int32_t ret = E_OK; - if (pid == PID_SELF_MAGIC) { + if (pid == -1) { pid = PROCS.current->pid; } diff --git a/ulib/_start.S b/ulib/_start.S index fcea48a..60d86c3 100644 --- a/ulib/_start.S +++ b/ulib/_start.S @@ -7,6 +7,6 @@ _start: call _premain movq $2, %rax // sys processctl - movq $0x5E1F, %rdi // self magic num + movq $-1, %rdi // self magic num movq $0, %rsi // kill cmd int $0x80