Kill Process
Endpoints
Kill Process
Terminate a process by sending SIGTERM signal
POST
Kill Process
Endpoint
Request
The process ID (PID) of the process to terminate. Must be a positive integer.
Example Request
Response
Success Response (200)
Returned when the process is successfully terminated.Always
true on successError Responses
Error message describing what went wrong
400 Bad Request
Returned when the PID is invalid (not a number, negative, or zero).- PID is not a number
- PID is less than or equal to 0
- PID is not an integer
403 Forbidden
Returned when the process cannot be killed due to insufficient permissions (EPERM error).- Process is owned by another user
- Process requires elevated privileges to terminate
- System security policies prevent the operation
404 Not Found
Returned when the specified process does not exist (ESRCH error).- Process with the given PID does not exist
- Process has already terminated
500 Internal Server Error
Returned for any other unexpected error during process termination.Implementation Details
- Uses Node.js
process.kill(pid, 'SIGTERM')to send the termination signal - SIGTERM allows the process to perform cleanup before exiting
- The endpoint is configured with
dynamic = "force-dynamic"andruntime = "nodejs" - PID validation accepts both numeric values and string representations that can be parsed as integers
Security Considerations
- Only processes that the server has permission to terminate can be killed
- System processes and processes owned by other users will return a 403 error
- Always validate the PID before calling this endpoint to avoid unintended termination