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

Load a filesystem path through which the current executable is accessible&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
getPathToExecutable(xref:bsl/string.adoc[bsl::string]* result);
----

== Description

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;

== Return Value

0 on success, and a non&hyphen;zero value otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *result*
| receives a path to the executable
|===


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