SDL Visual Test
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Structures | Typedefs | Functions
SDL_visualtest_process.h File Reference
#include <SDL_platform.h>

Go to the source code of this file.

Data Structures

struct  SDL_ProcessInfo
 
struct  SDL_ProcessExitStatus
 

Typedefs

typedef struct SDL_ProcessInfo SDL_ProcessInfo
 
typedef struct
SDL_ProcessExitStatus 
SDL_ProcessExitStatus
 

Functions

int SDL_LaunchProcess (char *file, char *args, SDL_ProcessInfo *pinfo)
 
int SDL_IsProcessRunning (SDL_ProcessInfo *pinfo)
 
int SDL_KillProcess (SDL_ProcessInfo *pinfo, SDL_ProcessExitStatus *ps)
 
int SDL_QuitProcess (SDL_ProcessInfo *pinfo, SDL_ProcessExitStatus *ps)
 
int SDL_GetProcessExitStatus (SDL_ProcessInfo *pinfo, SDL_ProcessExitStatus *ps)
 

Detailed Description

Provides cross-platfrom process launching and termination functionality.

Typedef Documentation

This structure stores the exit status (value returned by main()) and whether the process exited sucessfully or not.

Struct to store a platform specific handle to a process.

Function Documentation

int SDL_GetProcessExitStatus ( SDL_ProcessInfo pinfo,
SDL_ProcessExitStatus ps 
)

Gets the exit status of a process. If the exit status is -1, the process is still running.

Parameters
pinfoPointer to a SDL_ProcessInfo object of the process to be checked.
psPointer to a SDL_ProcessExitStatus object which will be populated with the exit status.
Returns
1 on success, 0 on failure.
int SDL_IsProcessRunning ( SDL_ProcessInfo pinfo)

Checks if a process is running or not.

Parameters
pinfoPointer to SDL_ProcessInfo object of the process that needs to be checked.
Returns
1 if the process is still running; zero if it is not and -1 if the status could not be retrieved.
int SDL_KillProcess ( SDL_ProcessInfo pinfo,
SDL_ProcessExitStatus ps 
)

Kills a currently running process.

Parameters
pinfoPointer to a SDL_ProcessInfo object of the process to be terminated.
psPointer to a SDL_ProcessExitStatus object which will be populated with the exit status.
Returns
1 on success, 0 on failure.
int SDL_LaunchProcess ( char *  file,
char *  args,
SDL_ProcessInfo pinfo 
)

Launches a process with the given commandline arguments.

Parameters
fileThe path to the executable to be launched.
argsThe command line arguments to be passed to the process.
pinfoPointer to an SDL_ProcessInfo object to be populated with platform specific information about the launched process.
Returns
Non-zero on success, zero on failure.
int SDL_QuitProcess ( SDL_ProcessInfo pinfo,
SDL_ProcessExitStatus ps 
)

Cleanly exits the process represented by pinfo and stores the exit status in the exit status object pointed to by ps.

Returns
1 on success, 0 on failure.