Skip to content

ProcessID

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

ProcessID BlitzLLVM

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

Returns: The id of the program.

Description

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

Gives the id the system gave a program started with CreateProcess, the number that the task manager and tools such as ps show. This is a BlitzLLVM extension.

  • It is for logs and other tools. To ask about the program or end it, use ProcessRunning, ProcessExitCode, WaitProcess and KillProcess, which can't hit another program by mistake.
  • On Linux and macOS the command runs through /bin/sh. A command that is one program becomes that program, so its id is the program's. A command of more than one program (with ;, && or |, for example) keeps the shell, and the id is the shell's.
  • The system can give the id to another program once this one has ended and its stream is closed.

Examples

server = CreateProcess("StrandedII -server")
DebugLog "Started the server as process " + ProcessID(server)

Related Commands

CreateProcess BlitzPlus, KillProcess BlitzLLVM, ProcessExitCode BlitzLLVM, ProcessRunning 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