| \hypertarget{_s_d_l__visualtest__process_8h}{\section{C\-:/\-Users/\-D\-E\-L\-L/\-Work/sdlvisualtest/visualtest/include/\-S\-D\-L\-\_\-visualtest\-\_\-process.h File Reference} |
| \label{_s_d_l__visualtest__process_8h}\index{C\-:/\-Users/\-D\-E\-L\-L/\-Work/sdlvisualtest/visualtest/include/\-S\-D\-L\-\_\-visualtest\-\_\-process.\-h@{C\-:/\-Users/\-D\-E\-L\-L/\-Work/sdlvisualtest/visualtest/include/\-S\-D\-L\-\_\-visualtest\-\_\-process.\-h}} |
| } |
| {\ttfamily \#include $<$S\-D\-L\-\_\-platform.\-h$>$}\\* |
| \subsection*{Data Structures} |
| \begin{DoxyCompactItemize} |
| \item |
| struct \hyperlink{struct_s_d_l___process_info}{S\-D\-L\-\_\-\-Process\-Info} |
| \item |
| struct \hyperlink{struct_s_d_l___process_exit_status}{S\-D\-L\-\_\-\-Process\-Exit\-Status} |
| \end{DoxyCompactItemize} |
| \subsection*{Typedefs} |
| \begin{DoxyCompactItemize} |
| \item |
| typedef struct \hyperlink{struct_s_d_l___process_info}{S\-D\-L\-\_\-\-Process\-Info} \hyperlink{_s_d_l__visualtest__process_8h_a94bc9e0b0b563a527ea50ef2eecd5402}{S\-D\-L\-\_\-\-Process\-Info} |
| \item |
| typedef struct \\* |
| \hyperlink{struct_s_d_l___process_exit_status}{S\-D\-L\-\_\-\-Process\-Exit\-Status} \hyperlink{_s_d_l__visualtest__process_8h_a5b7d5262f85e78bf4d53d88f3c509342}{S\-D\-L\-\_\-\-Process\-Exit\-Status} |
| \end{DoxyCompactItemize} |
| \subsection*{Functions} |
| \begin{DoxyCompactItemize} |
| \item |
| int \hyperlink{_s_d_l__visualtest__process_8h_a12c16e5b870e2794d6bd5a1a3bb4582f}{S\-D\-L\-\_\-\-Launch\-Process} (char $\ast$file, char $\ast$args, \hyperlink{struct_s_d_l___process_info}{S\-D\-L\-\_\-\-Process\-Info} $\ast$pinfo) |
| \item |
| int \hyperlink{_s_d_l__visualtest__process_8h_a3a131140a71bf68fa68a900f06872239}{S\-D\-L\-\_\-\-Is\-Process\-Running} (\hyperlink{struct_s_d_l___process_info}{S\-D\-L\-\_\-\-Process\-Info} $\ast$pinfo) |
| \item |
| int \hyperlink{_s_d_l__visualtest__process_8h_ae66242e44a004831ab231693fd11c8d0}{S\-D\-L\-\_\-\-Kill\-Process} (\hyperlink{struct_s_d_l___process_info}{S\-D\-L\-\_\-\-Process\-Info} $\ast$pinfo, \hyperlink{struct_s_d_l___process_exit_status}{S\-D\-L\-\_\-\-Process\-Exit\-Status} $\ast$ps) |
| \item |
| int \hyperlink{_s_d_l__visualtest__process_8h_ad8a5b6725ad1f0e1bac623cf4b6fc28d}{S\-D\-L\-\_\-\-Quit\-Process} (\hyperlink{struct_s_d_l___process_info}{S\-D\-L\-\_\-\-Process\-Info} $\ast$pinfo, \hyperlink{struct_s_d_l___process_exit_status}{S\-D\-L\-\_\-\-Process\-Exit\-Status} $\ast$ps) |
| \item |
| int \hyperlink{_s_d_l__visualtest__process_8h_a54545d6b9f737a14030b4ce55ddd4a62}{S\-D\-L\-\_\-\-Get\-Process\-Exit\-Status} (\hyperlink{struct_s_d_l___process_info}{S\-D\-L\-\_\-\-Process\-Info} $\ast$pinfo, \hyperlink{struct_s_d_l___process_exit_status}{S\-D\-L\-\_\-\-Process\-Exit\-Status} $\ast$ps) |
| \end{DoxyCompactItemize} |
| |
| |
| \subsection{Detailed Description} |
| Provides cross-\/platfrom process launching and termination functionality. |
| |
| \subsection{Typedef Documentation} |
| \hypertarget{_s_d_l__visualtest__process_8h_a5b7d5262f85e78bf4d53d88f3c509342}{\index{S\-D\-L\-\_\-visualtest\-\_\-process.\-h@{S\-D\-L\-\_\-visualtest\-\_\-process.\-h}!S\-D\-L\-\_\-\-Process\-Exit\-Status@{S\-D\-L\-\_\-\-Process\-Exit\-Status}} |
| \index{S\-D\-L\-\_\-\-Process\-Exit\-Status@{S\-D\-L\-\_\-\-Process\-Exit\-Status}!SDL_visualtest_process.h@{S\-D\-L\-\_\-visualtest\-\_\-process.\-h}} |
| \subsubsection[{S\-D\-L\-\_\-\-Process\-Exit\-Status}]{\setlength{\rightskip}{0pt plus 5cm}typedef struct {\bf S\-D\-L\-\_\-\-Process\-Exit\-Status} {\bf S\-D\-L\-\_\-\-Process\-Exit\-Status}}}\label{_s_d_l__visualtest__process_8h_a5b7d5262f85e78bf4d53d88f3c509342} |
| This structure stores the exit status (value returned by \hyperlink{testharness_8c_a0ddf1224851353fc92bfbff6f499fa97}{main()}) and whether the process exited sucessfully or not. \hypertarget{_s_d_l__visualtest__process_8h_a94bc9e0b0b563a527ea50ef2eecd5402}{\index{S\-D\-L\-\_\-visualtest\-\_\-process.\-h@{S\-D\-L\-\_\-visualtest\-\_\-process.\-h}!S\-D\-L\-\_\-\-Process\-Info@{S\-D\-L\-\_\-\-Process\-Info}} |
| \index{S\-D\-L\-\_\-\-Process\-Info@{S\-D\-L\-\_\-\-Process\-Info}!SDL_visualtest_process.h@{S\-D\-L\-\_\-visualtest\-\_\-process.\-h}} |
| \subsubsection[{S\-D\-L\-\_\-\-Process\-Info}]{\setlength{\rightskip}{0pt plus 5cm}typedef struct {\bf S\-D\-L\-\_\-\-Process\-Info} {\bf S\-D\-L\-\_\-\-Process\-Info}}}\label{_s_d_l__visualtest__process_8h_a94bc9e0b0b563a527ea50ef2eecd5402} |
| Struct to store a platform specific handle to a process. |
| |
| \subsection{Function Documentation} |
| \hypertarget{_s_d_l__visualtest__process_8h_a54545d6b9f737a14030b4ce55ddd4a62}{\index{S\-D\-L\-\_\-visualtest\-\_\-process.\-h@{S\-D\-L\-\_\-visualtest\-\_\-process.\-h}!S\-D\-L\-\_\-\-Get\-Process\-Exit\-Status@{S\-D\-L\-\_\-\-Get\-Process\-Exit\-Status}} |
| \index{S\-D\-L\-\_\-\-Get\-Process\-Exit\-Status@{S\-D\-L\-\_\-\-Get\-Process\-Exit\-Status}!SDL_visualtest_process.h@{S\-D\-L\-\_\-visualtest\-\_\-process.\-h}} |
| \subsubsection[{S\-D\-L\-\_\-\-Get\-Process\-Exit\-Status}]{\setlength{\rightskip}{0pt plus 5cm}int S\-D\-L\-\_\-\-Get\-Process\-Exit\-Status ( |
| \begin{DoxyParamCaption} |
| \item[{{\bf S\-D\-L\-\_\-\-Process\-Info} $\ast$}]{pinfo, } |
| \item[{{\bf S\-D\-L\-\_\-\-Process\-Exit\-Status} $\ast$}]{ps} |
| \end{DoxyParamCaption} |
| )}}\label{_s_d_l__visualtest__process_8h_a54545d6b9f737a14030b4ce55ddd4a62} |
| Gets the exit status of a process. If the exit status is -\/1, the process is still running. |
| |
| |
| \begin{DoxyParams}{Parameters} |
| {\em pinfo} & Pointer to a \hyperlink{struct_s_d_l___process_info}{S\-D\-L\-\_\-\-Process\-Info} object of the process to be checked. \\ |
| \hline |
| {\em ps} & Pointer to a \hyperlink{struct_s_d_l___process_exit_status}{S\-D\-L\-\_\-\-Process\-Exit\-Status} object which will be populated with the exit status.\\ |
| \hline |
| \end{DoxyParams} |
| \begin{DoxyReturn}{Returns} |
| 1 on success, 0 on failure. |
| \end{DoxyReturn} |
| \hypertarget{_s_d_l__visualtest__process_8h_a3a131140a71bf68fa68a900f06872239}{\index{S\-D\-L\-\_\-visualtest\-\_\-process.\-h@{S\-D\-L\-\_\-visualtest\-\_\-process.\-h}!S\-D\-L\-\_\-\-Is\-Process\-Running@{S\-D\-L\-\_\-\-Is\-Process\-Running}} |
| \index{S\-D\-L\-\_\-\-Is\-Process\-Running@{S\-D\-L\-\_\-\-Is\-Process\-Running}!SDL_visualtest_process.h@{S\-D\-L\-\_\-visualtest\-\_\-process.\-h}} |
| \subsubsection[{S\-D\-L\-\_\-\-Is\-Process\-Running}]{\setlength{\rightskip}{0pt plus 5cm}int S\-D\-L\-\_\-\-Is\-Process\-Running ( |
| \begin{DoxyParamCaption} |
| \item[{{\bf S\-D\-L\-\_\-\-Process\-Info} $\ast$}]{pinfo} |
| \end{DoxyParamCaption} |
| )}}\label{_s_d_l__visualtest__process_8h_a3a131140a71bf68fa68a900f06872239} |
| Checks if a process is running or not. |
| |
| |
| \begin{DoxyParams}{Parameters} |
| {\em pinfo} & Pointer to \hyperlink{struct_s_d_l___process_info}{S\-D\-L\-\_\-\-Process\-Info} object of the process that needs to be checked.\\ |
| \hline |
| \end{DoxyParams} |
| \begin{DoxyReturn}{Returns} |
| 1 if the process is still running; zero if it is not and -\/1 if the status could not be retrieved. |
| \end{DoxyReturn} |
| \hypertarget{_s_d_l__visualtest__process_8h_ae66242e44a004831ab231693fd11c8d0}{\index{S\-D\-L\-\_\-visualtest\-\_\-process.\-h@{S\-D\-L\-\_\-visualtest\-\_\-process.\-h}!S\-D\-L\-\_\-\-Kill\-Process@{S\-D\-L\-\_\-\-Kill\-Process}} |
| \index{S\-D\-L\-\_\-\-Kill\-Process@{S\-D\-L\-\_\-\-Kill\-Process}!SDL_visualtest_process.h@{S\-D\-L\-\_\-visualtest\-\_\-process.\-h}} |
| \subsubsection[{S\-D\-L\-\_\-\-Kill\-Process}]{\setlength{\rightskip}{0pt plus 5cm}int S\-D\-L\-\_\-\-Kill\-Process ( |
| \begin{DoxyParamCaption} |
| \item[{{\bf S\-D\-L\-\_\-\-Process\-Info} $\ast$}]{pinfo, } |
| \item[{{\bf S\-D\-L\-\_\-\-Process\-Exit\-Status} $\ast$}]{ps} |
| \end{DoxyParamCaption} |
| )}}\label{_s_d_l__visualtest__process_8h_ae66242e44a004831ab231693fd11c8d0} |
| Kills a currently running process. |
| |
| |
| \begin{DoxyParams}{Parameters} |
| {\em pinfo} & Pointer to a \hyperlink{struct_s_d_l___process_info}{S\-D\-L\-\_\-\-Process\-Info} object of the process to be terminated. \\ |
| \hline |
| {\em ps} & Pointer to a \hyperlink{struct_s_d_l___process_exit_status}{S\-D\-L\-\_\-\-Process\-Exit\-Status} object which will be populated with the exit status.\\ |
| \hline |
| \end{DoxyParams} |
| \begin{DoxyReturn}{Returns} |
| 1 on success, 0 on failure. |
| \end{DoxyReturn} |
| \hypertarget{_s_d_l__visualtest__process_8h_a12c16e5b870e2794d6bd5a1a3bb4582f}{\index{S\-D\-L\-\_\-visualtest\-\_\-process.\-h@{S\-D\-L\-\_\-visualtest\-\_\-process.\-h}!S\-D\-L\-\_\-\-Launch\-Process@{S\-D\-L\-\_\-\-Launch\-Process}} |
| \index{S\-D\-L\-\_\-\-Launch\-Process@{S\-D\-L\-\_\-\-Launch\-Process}!SDL_visualtest_process.h@{S\-D\-L\-\_\-visualtest\-\_\-process.\-h}} |
| \subsubsection[{S\-D\-L\-\_\-\-Launch\-Process}]{\setlength{\rightskip}{0pt plus 5cm}int S\-D\-L\-\_\-\-Launch\-Process ( |
| \begin{DoxyParamCaption} |
| \item[{char $\ast$}]{file, } |
| \item[{char $\ast$}]{args, } |
| \item[{{\bf S\-D\-L\-\_\-\-Process\-Info} $\ast$}]{pinfo} |
| \end{DoxyParamCaption} |
| )}}\label{_s_d_l__visualtest__process_8h_a12c16e5b870e2794d6bd5a1a3bb4582f} |
| Launches a process with the given commandline arguments. |
| |
| |
| \begin{DoxyParams}{Parameters} |
| {\em file} & The path to the executable to be launched. \\ |
| \hline |
| {\em args} & The command line arguments to be passed to the process. \\ |
| \hline |
| {\em pinfo} & Pointer to an \hyperlink{struct_s_d_l___process_info}{S\-D\-L\-\_\-\-Process\-Info} object to be populated with platform specific information about the launched process.\\ |
| \hline |
| \end{DoxyParams} |
| \begin{DoxyReturn}{Returns} |
| Non-\/zero on success, zero on failure. |
| \end{DoxyReturn} |
| \hypertarget{_s_d_l__visualtest__process_8h_ad8a5b6725ad1f0e1bac623cf4b6fc28d}{\index{S\-D\-L\-\_\-visualtest\-\_\-process.\-h@{S\-D\-L\-\_\-visualtest\-\_\-process.\-h}!S\-D\-L\-\_\-\-Quit\-Process@{S\-D\-L\-\_\-\-Quit\-Process}} |
| \index{S\-D\-L\-\_\-\-Quit\-Process@{S\-D\-L\-\_\-\-Quit\-Process}!SDL_visualtest_process.h@{S\-D\-L\-\_\-visualtest\-\_\-process.\-h}} |
| \subsubsection[{S\-D\-L\-\_\-\-Quit\-Process}]{\setlength{\rightskip}{0pt plus 5cm}int S\-D\-L\-\_\-\-Quit\-Process ( |
| \begin{DoxyParamCaption} |
| \item[{{\bf S\-D\-L\-\_\-\-Process\-Info} $\ast$}]{pinfo, } |
| \item[{{\bf S\-D\-L\-\_\-\-Process\-Exit\-Status} $\ast$}]{ps} |
| \end{DoxyParamCaption} |
| )}}\label{_s_d_l__visualtest__process_8h_ad8a5b6725ad1f0e1bac623cf4b6fc28d} |
| Cleanly exits the process represented by {\ttfamily pinfo} and stores the exit status in the exit status object pointed to by {\ttfamily ps}. |
| |
| \begin{DoxyReturn}{Returns} |
| 1 on success, 0 on failure. |
| \end{DoxyReturn} |