---
name: "SDL_CreateProcessWithProperties"
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_CreateProcessWithProperties"
---

# SDL\_CreateProcessWithProperties(3)

Create a new process with the specified properties.

## NAME

SDL\_CreateProcessWithProperties - Create a new process with the specified properties.

## HEADER FILE

Defined in SDL3/SDL\_process.h

## SYNOPSIS

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

**SDL\_Process \* SDL\_CreateProcessWithProperties(SDL\_PropertiesID props);**

## DESCRIPTION

These are the supported properties:

•  **SDL\_PROP\_PROCESS\_CREATE\_ARGS\_POINTER** :\
   an array of strings containing the program to run, any arguments, and a\
   NULL pointer, e.g. const char \*args\[\] = { "myprogram", "argument", NULL\
   }. This is a required property.

•  **SDL\_PROP\_PROCESS\_CREATE\_ENVIRONMENT\_POINTER** :\
   an  **SDL\_Environment**\
  pointer. If this property is set,\
   it will be the entire environment for the process, otherwise the current\
   environment is used.

•  **SDL\_PROP\_PROCESS\_CREATE\_STDIN\_NUMBER** :\
   an  **SDL\_ProcessIO**\
  value describing where standard input\
   for the process comes from, defaults to

**SDL\_PROCESS\_STDIO\_NULL** .

•  **SDL\_PROP\_PROCESS\_CREATE\_STDIN\_POINTER** :\
   an  **SDL\_IOStream**\
  pointer used for standard input when

**SDL\_PROP\_PROCESS\_CREATE\_STDIN\_NUMBER** is set to  **SDL\_PROCESS\_STDIO\_REDIRECT** .

•  **SDL\_PROP\_PROCESS\_CREATE\_STDOUT\_NUMBER** :\
   an  **SDL\_ProcessIO**\
  value describing where standard output\
   for the process goes to, defaults to

**SDL\_PROCESS\_STDIO\_INHERITED** .

•  **SDL\_PROP\_PROCESS\_CREATE\_STDOUT\_POINTER** :\
   an  **SDL\_IOStream**\
  pointer used for standard output when

**SDL\_PROP\_PROCESS\_CREATE\_STDOUT\_NUMBER** is set to  **SDL\_PROCESS\_STDIO\_REDIRECT** .

•  **SDL\_PROP\_PROCESS\_CREATE\_STDERR\_NUMBER** :\
   an  **SDL\_ProcessIO**\
  value describing where standard error\
   for the process goes to, defaults to

**SDL\_PROCESS\_STDIO\_INHERITED** .

•  **SDL\_PROP\_PROCESS\_CREATE\_STDERR\_POINTER** :\
   an  **SDL\_IOStream**\
  pointer used for standard error when

**SDL\_PROP\_PROCESS\_CREATE\_STDERR\_NUMBER** is set to  **SDL\_PROCESS\_STDIO\_REDIRECT** .

•  **SDL\_PROP\_PROCESS\_CREATE\_STDERR\_TO\_STDOUT\_BOOLEAN** :\
   true if the error output of the process should be redirected into the\
   standard output of the process. This property has no effect if

**SDL\_PROP\_PROCESS\_CREATE\_STDERR\_NUMBER** is set.

•  **SDL\_PROP\_PROCESS\_CREATE\_BACKGROUND\_BOOLEAN** :\
   true if the process should run in the background. In this case the\
   default input and output is

**SDL\_PROCESS\_STDIO\_NULL** and the exitcode of\
   the process is not available, and will always be 0.

On POSIX platforms, wait() and waitpid(-1, ...) should not be called, and SIGCHLD should not be ignored or handled because those would prevent SDL from properly tracking the lifetime of the underlying process. You should use  **SDL\_WaitProcess** () instead.

## FUNCTION PARAMETERS

- *props*

  the properties to use.

## 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\_CreateProcess**(3)](/SDL_CreateProcess/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)
