Allow to get current process username
Summary:
Use case
Zed is an application which allows users
to upload content. As such, it needs to
help the site administrator to configure
existence and permissions of target folders.
This method is provided to be used there
to geenrate a help message with the user
who could be chowned the directory to,
to provide a better solution than a chmod 0777.
See T1678.
Implementation notes
The command whoami is available on Windows too,
but shows domain\user information, replacing the
domain by hostname when the account is local to
the machine. We filter the domain part out, to be
coherent with Linux and UNIX output.
Reviewers: dereckson
Reviewed By: dereckson
Subscribers: inidal, DorianWinty
Differential Revision: https://devcentral.nasqueron.org/D2499