Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • R relibc
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 36
    • Issues 36
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 20
    • Merge requests 20
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • redox-osredox-os
  • relibc
  • Merge requests
  • !346

Move processes' cwd state into relibc

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged 4lDO2 requested to merge 4lDO2/relibc:relibc_cwd into master Aug 12, 2022
  • Overview 0
  • Commits 4
  • Pipelines 5
  • Changes 11

This moves the current working directory into a global variable in relibc. fexec_impl has been modified to also support passing pointers to data in auxiliary vectors, where the cwd is passed to the next process. The main downside with this, is that because most C library functions requiring canonicalization, are also async-signal-safe, we must run sigprocmask before and after locking the CWD. This could probably be solved using arc-swap or re-entrant mutexes, but since syscalls (in theory) should be faster than context switches, this ought to be fine. And, a large fraction of the SYS_OPEN calls from most programs, are already absolute. This MR is independent of the kernel MR, although this should be merged first.

Bootstrap and escalated must update their git dependency, and change a few lines, accordingly.

Edited Aug 15, 2022 by Jeremy Soller
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: relibc_cwd