process.suspend

process.suspend

process.suspend

Function

Pause the started child process and its child process tree under Windows. Suitable for bt_app desktop batch processing tasks to temporarily suspend multi-level sub-processes such as PowerShell, WPS, and poppler.

Syntax

Parameters

No parameters.

Return value

TypeDescription
BoolReturns true if at least one thread is successfully suspended; returns false if there is no child process handle, the process has exited, or there are no threads to suspend.

Example

Notes

  • suspend will not clear the currently saved child process handle.
  • Under Windows, suspend will suspend accessible threads in the child process tree through system process and thread snapshots.
  • After pausing, you usually need to call resume to resume, or call kill to cancel the task.
  • Linux/macOS does not currently support this method and will return a runtime error.