---
name: "SDL_CreateProcess"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_CreateProcess"
---

# SDL\_CreateProcess(3)

Create a new process.

## NAME

SDL\_CreateProcess - Create a new process.

## HEADER FILE

Defined in SDL3/SDL\_process.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**SDL\_Process \* SDL\_CreateProcess(const char \* const \*args, bool pipe\_stdio);**

## DESCRIPTION

The path to the executable is supplied in args\[0\]. args\[1..N\] are additional arguments passed on the command line of the new process, and the argument list should be terminated with a NULL, e.g.:

-

  ```
  const char *args[] = { "myprogram", "argument", NULL };
  ```

Setting pipe\_stdio to true is equivalent to setting

**SDL\_PROP\_PROCESS\_CREATE\_STDIN\_NUMBER** and

**SDL\_PROP\_PROCESS\_CREATE\_STDOUT\_NUMBER** to  **SDL\_PROCESS\_STDIO\_APP** , and will allow the use of  **SDL\_ReadProcess** () or

**SDL\_GetProcessInput** () and

**SDL\_GetProcessOutput** ().

See  **SDL\_CreateProcessWithProperties** () for more details.

## FUNCTION PARAMETERS

- *args*

  the path and arguments for the new process.

- *pipe\_stdio*

  true to create pipes to the process's standard input and from the process's standard output, false for the process to have no input and inherit the application's standard output.

## RETURN VALUE

( **SDL\_Process**\
  \*) Returns the newly created and running process, or NULL if the process couldn't be created.

## THREAD SAFETY

It is safe to call this function from any thread.

## AVAILABILITY

This function is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_CreateProcessWithProperties**(3)](/SDL_CreateProcessWithProperties/3.md), **•**(3), [**SDL\_GetProcessProperties**(3)](/SDL_GetProcessProperties/3.md), **•**(3), [**SDL\_ReadProcess**(3)](/SDL_ReadProcess/3.md), **•**(3), [**SDL\_GetProcessInput**(3)](/SDL_GetProcessInput/3.md), **•**(3), [**SDL\_GetProcessOutput**(3)](/SDL_GetProcessOutput/3.md), **•**(3), [**SDL\_KillProcess**(3)](/SDL_KillProcess/3.md), **•**(3), [**SDL\_WaitProcess**(3)](/SDL_WaitProcess/3.md), **•**(3), [**SDL\_DestroyProcess**(3)](/SDL_DestroyProcess/3.md)
