Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • G GLib
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 852
    • Issues 852
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 45
    • Merge requests 45
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOMEGNOME
  • GLib
  • Merge requests
  • !3102

Add g_get_argv0(), g_set_argv0() and g_get_executable_path()

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Emmanuel Fleury requested to merge emmanuel.fleury/glib:binary_relocatability_api into main Nov 30, 2022
  • Overview 28
  • Commits 2
  • Pipelines 4
  • Changes 6

The main point of this patch is to provide a portable way to retrieve a path to the executable. To this end, a new interface is provided, allowing glib to know the full value of argv[0]. g_option_context_parse() will set this value like it currently sets prgname. g_get_prgname() can then use this value's basename as default.

Fixes: #31

Edited Nov 30, 2022 by Emmanuel Fleury
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: binary_relocatability_api