Process:suspend() method

Suspends current execution of the running process.

Notes

  • This function tries to suspend all threads of the process.
  • Process.resume() method to resume process execution

Return value

This method returns a boolean value indicating if the operation succeeded.

Example

local sysutils = require "sysutils" -- create a process launching Wordpad local p = sysutils.Process([[wluart.exe -e "require('ui').info('Process have been resumed')"]]) -- start the process and suspend it p:spawn(true) -- wait 3sec sleep(3000) -- wake up the process p:resume() -- wait before exiting the program (to see the process message box) sleep(1000)