Fix the call to terminate()
authorcoderain <coderain@sdf.org>
Tue, 4 Apr 2017 23:55:49 +0000 (01:55 +0200)
committercoderain <coderain@sdf.org>
Tue, 4 Apr 2017 23:55:49 +0000 (01:55 +0200)
kernel/src/process.c

index c50379ba8df39973366a0f49a3fe2dba0d229fe4..1af7330904e04d7cc20fbac673fc80930bc4eeff 100644 (file)
@@ -157,6 +157,13 @@ void init_user_stack(uintptr_t *stack_pointer, process_params_t *parameters)
         /* push eax */
         0x50,
 
+        /* push INVALID_HANDLE */
+        0x68,
+        INVALID_HANDLE & 0xFF,
+        (INVALID_HANDLE >> 8) & 0xFF,
+        (INVALID_HANDLE >> 16) & 0xFF,
+        (INVALID_HANDLE >> 24) & 0xFF,
+
         /* mov eax, SYSCALL_TERMINATE */
         0xB8,
         SYSCALL_TERMINATE & 0xFF,