Skip to content

Cmd

Spice
import "std/os/cmd";

Functions

getPID

Spice
public f<int> getPID()

Retrieve the process id of the current process.

Returns: int — Process id

execCmd

Spice
public f<int> execCmd(string cmd)

Executes a shell command by creating a new process.

Parameters

Name Type Description
cmd string

Returns: int — Return code of the shell comand

execCmd

Spice
public f<int> execCmd(const String& cmd)

Executes a shell command by creating a new process.

Parameters

Name Type Description
cmd const String&

Returns: int — Return code of the shell comand