New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 726124 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Fuchsia
Pri: 3
Type: Bug

Blocking:
issue 706592



Sign in to add a comment

No way to retrieve the executable path

Project Member Reported by scottmg@chromium.org, May 24 2017

Issue description

I'm not sure if this is likely or possible to be implemented, but Chrome would like to know its binary name.

This is implemented by reading /proc/self/exe, or ::GetModuleFileName(NULL, ...), or _NSGetExecutablePath on other platforms.
 
Blocking: 706592
Cc: jam...@chromium.org cpu@chromium.org kulakowski@chromium.org
Maybe mx_object_get_property(mx_process_self(), MX_PROP_NAME, name, sizeof(name)) ?

Or is this stashed elsewhere?

I didn't see anything promising looking in __libc_start_main.c. __environ is close, but I can't get to argv[0] from there I don't think.

Ideally I guess, both the current .so and the main binary, but I'll take whichever.
Pointer bug at MG-797.
Project Member

Comment 4 by bugdroid1@chromium.org, May 25 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1ab7aa8f394ec33c1fd775adbd34f22907cdae05

commit 1ab7aa8f394ec33c1fd775adbd34f22907cdae05
Author: scottmg <scottmg@chromium.org>
Date: Thu May 25 05:22:49 2017

fuchsia: add base_paths_fuchsia.cc

I was going to use base_paths_posix.cc originally but it's already a big chain
of #ifdefs, and there's no XDG on Fuchsia, so it didn't seem that helpful.

BUG=706592, 726124 

Review-Url: https://codereview.chromium.org/2907473002
Cr-Commit-Position: refs/heads/master@{#474563}

[modify] https://crrev.com/1ab7aa8f394ec33c1fd775adbd34f22907cdae05/base/BUILD.gn
[add] https://crrev.com/1ab7aa8f394ec33c1fd775adbd34f22907cdae05/base/base_paths_fuchsia.cc
[modify] https://crrev.com/1ab7aa8f394ec33c1fd775adbd34f22907cdae05/base/base_paths_posix.cc
[modify] https://crrev.com/1ab7aa8f394ec33c1fd775adbd34f22907cdae05/base/path_service.cc
[modify] https://crrev.com/1ab7aa8f394ec33c1fd775adbd34f22907cdae05/base/path_service_unittest.cc

Comment 5 by w...@chromium.org, Jul 15 2017

Components: Internals>PlatformIntegration
Project Member

Comment 6 by bugdroid1@chromium.org, Dec 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/crashpad/crashpad.git/+/741a84a2987fd57c709d069d4cafdfe68b719332

commit 741a84a2987fd57c709d069d4cafdfe68b719332
Author: Scott Graham <scottmg@chromium.org>
Date: Tue Dec 05 18:59:26 2017

fuchsia: Add runner, get crashpad_test_test building and running

- Implement build/run_tests.py to run on Fuchsia device
- Implement paths_fuchsia.cc using standard Fuchsia namespace layout
- Exclude multiprocess tests, currently unimplemented
- Don't use unnecessary O_ flags on Fuchsia in open() call.

Bug: crashpad:196,  chromium:726124 , ZX-797
Change-Id: Ie59dce685b4c3fe54f3e36f357c1101d402ee8b7
Reviewed-on: https://chromium-review.googlesource.com/802180
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>

[modify] https://crrev.com/741a84a2987fd57c709d069d4cafdfe68b719332/build/run_tests.py
[modify] https://crrev.com/741a84a2987fd57c709d069d4cafdfe68b719332/test/BUILD.gn
[modify] https://crrev.com/741a84a2987fd57c709d069d4cafdfe68b719332/test/test_paths.cc
[modify] https://crrev.com/741a84a2987fd57c709d069d4cafdfe68b719332/util/BUILD.gn
[modify] https://crrev.com/741a84a2987fd57c709d069d4cafdfe68b719332/util/file/file_io_posix.cc
[add] https://crrev.com/741a84a2987fd57c709d069d4cafdfe68b719332/util/misc/paths_fuchsia.cc

Status: WontFix (was: ExternalDependency)
The full path to the binary is constant if the binary is loaded from a package.

Marking bug as obsolete.

Sign in to add a comment