DevHlp KillProc: Difference between revisions
Appearance
Created page with "DevHlp_KillProc kills a process unconditionally. ==Syntax== ===C=== <PRE> </PRE> ===Assembler=== Calling Sequence in Assembler <PRE> MOV BX, pid MOV DL, DevHlp_KillProc CA..." |
No edit summary |
||
Line 1: | Line 1: | ||
DevHlp_KillProc kills a process unconditionally. | DevHlp_KillProc kills a process unconditionally. | ||
This is a special entry into DosKillProcess, which is more rigid in killing processes: the killed process won’t be able to execute its kill signal handler, thus open files might not be closed properly. A process currently operating in ring 0 will terminate as soon as it returns to ring 3 (this means, a process blocked in the kernel, e.g. on a pending I/O, can still not be killed). This devhlp corresponds to the SESKillProcess API. | |||
==Syntax== | ==Syntax== | ||
===C=== | ===C=== | ||
There is no direct C calling Sequence. | |||
===Assembler=== | ===Assembler=== | ||
Line 17: | Line 17: | ||
==Parameters== | ==Parameters== | ||
===C=== | ===C=== | ||
N/A | |||
===Assembler=== | ===Assembler=== | ||
* BX = Pid of process to kill, 0 = current process | |||
* DL = 07dh | |||
==Return Code== | ==Return Code== | ||
===C=== | ===C=== | ||
N/A | |||
===Assembler=== | ===Assembler=== | ||
Line 40: | Line 35: | ||
; 217 ERROR_ZOMBIE_PROCESS Process is already dead pending collection of result codes by parent. | ; 217 ERROR_ZOMBIE_PROCESS Process is already dead pending collection of result codes by parent. | ||
; 303 ERROR_INVALID_PROCID PID is invalid. | ; 303 ERROR_INVALID_PROCID PID is invalid. | ||
or: | |||
CY=0, AX = 0, okay | |||
CY=1, AX = APIRET error code | |||
==Remarks== | ==Remarks== | ||
The process is killed unconditionally. Signal and exception handlers are not run. This Device Help may be called at | |||
Task Time only. | |||
==Example Code== | ==Example Code== | ||
===C=== | ===C=== | ||
N/A | |||
===Assembler=== | ===Assembler=== | ||
==Related Functions== | ==Related Functions== | ||
[[Category:DevHlps]] | [[Category:DevHlps]] |
Revision as of 22:50, 7 June 2017
DevHlp_KillProc kills a process unconditionally.
This is a special entry into DosKillProcess, which is more rigid in killing processes: the killed process won’t be able to execute its kill signal handler, thus open files might not be closed properly. A process currently operating in ring 0 will terminate as soon as it returns to ring 3 (this means, a process blocked in the kernel, e.g. on a pending I/O, can still not be killed). This devhlp corresponds to the SESKillProcess API.
Syntax
C
There is no direct C calling Sequence.
Assembler
Calling Sequence in Assembler
MOV BX, pid MOV DL, DevHlp_KillProc CALL [Device_Help]
Parameters
C
N/A
Assembler
- BX = Pid of process to kill, 0 = current process
- DL = 07dh
Return Code
C
N/A
Assembler
Results in Assembler
- C Clear if the process is killed. AX = zero.
- C Set if error. AX = Error code.
Possible errors
- 217 ERROR_ZOMBIE_PROCESS Process is already dead pending collection of result codes by parent.
- 303 ERROR_INVALID_PROCID PID is invalid.
or:
CY=0, AX = 0, okay CY=1, AX = APIRET error code
Remarks
The process is killed unconditionally. Signal and exception handlers are not run. This Device Help may be called at Task Time only.
Example Code
C
N/A