[#BloombergLP-bdls-ProcessUtil]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdls.adoc[bdls]::ProcessUtil
:relfileprefix: ../../
:mrdocs:

This `struct` contains utility methods for platform&hyphen;independent process operations&period;

== Synopsis

Declared in `&lt;bdls&lowbar;processutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
struct ProcessUtil;
----

== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdls/ProcessUtil/getPathToExecutable.adoc[`getPathToExecutable`] 
| Set `&ast;result` to a path with which the executable can be accessed (which may bear no relation to the command line used to begin this process)&period; Return 0 on success, and a non&hyphen;zero value otherwise&period; On failure, `&ast;result` will not be modified&period; Note that the returned value of `&ast;result` may not correspond to the value of `argv&lsqb;0&rsqb;` passed to `main`&period; Some systems provide more reliable alternatives, such as through the &quot;&sol;proc&quot; file system&period;
| xref:BloombergLP/bdls/ProcessUtil/getProcessId.adoc[`getProcessId`] 
| Return the system specific process identifier for the currently running process&period;
| xref:BloombergLP/bdls/ProcessUtil/getProcessName.adoc[`getProcessName`] 
| Load the system specific process name for the currently running process into the specified `&ast;result`&period; Return 0 on success, and a non&hyphen;zero value otherwise&period; The language in which `&ast;result` is provided is unspecified&semi; `&ast;result` will be encoded as UTF&hyphen;8, but might not be normalized&period; On failure, `&ast;result` will be unmodified&period; Note that the primary purpose of this method is to provide an identifier for the current process, and `&ast;result` may not be a valid path to the executable&semi; to access the actual task file for the process use `getPathToExecutable` below&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
