[#BloombergLP-bdls-PipeUtil-makeCanonicalName-0a]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdls.adoc[bdls]::xref:BloombergLP/bdls/PipeUtil.adoc[PipeUtil]::makeCanonicalName
:relfileprefix: ../../../
:mrdocs:

Load the canonical pipe name for `baseName` into `pipeName`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
makeCanonicalName(
    xref:bsl/string.adoc[bsl::string]* pipeName,
    std::string&lowbar;view const& baseName);
----

== Description

Load into the specified `pipeName` the system&hyphen;dependent canonical pipe name corresponding to the specified `baseName`&period; Return 0 on success, and a nonzero value if `baseName` cannot be part of a pipe name on this system&period;

On Unix systems, the canonical name is defined by prefixing `baseName` with the directory specified by the `SOCKDIR` environment variable if it is set, otherwise with the directory specified by the `TMPDIR` environment variable if it is set, and otherwise by the current directory&period;

On Windows systems, the canonical name is defined by prefixing `baseName` with &quot;&bsol;&period;pipe&quot;&period;

Finally, any uppercase characters in `baseName` are converted to lower case in the canonical name&period;

== Return Value

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

== Parameters

[cols="1,4"]
|===
| Name| Description
| *pipeName*
| receives the system&hyphen;dependent canonical pipe name
| *baseName*
| base name from which to form the canonical pipe name
|===


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