소스 검색

* retrieve process ID even if running under DOS

git-svn-id: trunk@19644 -
Tomas Hajny 13 년 전
부모
커밋
21179c6833
1개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. 5 2
      rtl/emx/system.pas

+ 5 - 2
rtl/emx/system.pas

@@ -538,7 +538,11 @@ begin
 {$WARNING To be checked/corrected!}
 {$WARNING To be checked/corrected!}
                 ApplicationType := 1;   (* Running under DOS. *)
                 ApplicationType := 1;   (* Running under DOS. *)
                 IsConsole := true;
                 IsConsole := true;
-                ProcessID := 1;
+                asm
+                    mov ax, 7F05h
+                    call syscall
+                    mov ProcessID, eax
+                end ['eax'];
                 ThreadID := 1;
                 ThreadID := 1;
             end;
             end;
         osOS2:
         osOS2:
@@ -560,7 +564,6 @@ begin
 {$WARNING To be checked/corrected!}
 {$WARNING To be checked/corrected!}
                 ApplicationType := 1;   (* Running under DOS. *)
                 ApplicationType := 1;   (* Running under DOS. *)
                 IsConsole := true;
                 IsConsole := true;
-                ProcessID := 1;
                 ThreadID := 1;
                 ThreadID := 1;
             end;
             end;
     end;
     end;