Skip to content

ProcessRunning

Narta Xaymar Dirks edited this page Dec 3, 2026 · 2 revisions

ProcessRunning BlitzLLVM

ProcessRunning:Int32 process:Int32
Parameter Mode Type Default Description
process In Int32 required The stream that CreateProcess returned.

Returns: 1 while the program runs, 0 once it has ended.

Description

BlitzLLVM This command does not exist in the original Blitz products. BlitzLLVM adds it.

Tells whether a program started with CreateProcess still runs. This is a BlitzLLVM extension: the originals can't ask about the program once it is started.

  • It never waits, so it can be asked every frame. To wait for the program, use WaitProcess.
  • A program that was ended with KillProcess may run for a moment longer on Linux and macOS, until it has handled the signal.
  • Reading what the program wrote is not needed for this: the stream can still be read after the program has ended.

Examples

server = CreateProcess("StrandedII -server")
While ProcessRunning(server)
	; ... the game ...
	Delay 10
Wend
Print "The server stopped with exit code " + ProcessExitCode(server)
CloseFile server

Related Commands

CreateProcess BlitzPlus, KillProcess BlitzLLVM, ProcessExitCode BlitzLLVM, ProcessID BlitzLLVM, ReadProcessStream BlitzLLVM, WaitProcess BlitzLLVM, WriteProcessStream BlitzLLVM

Home · Command Index


Getting started

Language

Tools


Language Features
BlitzBasic
Blitz3D
BlitzPlus
Differences

More

Clone this wiki locally