Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • R redoxfs
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 6
    • Issues 6
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 5
    • Merge requests 5
  • 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
  • redoxfs
  • Merge requests
  • !55

Remove unnecessary use of fork and pipes

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Aditya Gupta requested to merge adi-g15/redoxfs:fork_pipe into master Mar 18, 2022
  • Overview 2
  • Commits 1
  • Pipelines 1
  • Changes 1

Previously, we created a pipe, and then forked, then in one process we block on a read, while in other process, AFTER it completes, it does a write on the write end of the pipe, and hence it + the process blocking on read end of the pipe will both exit.

So, the pipes and fork can be removed because,

  1. One process was needlessly blocking, it was doing no work, and finally waited for the other to end
  2. The other process is doing everything non-concurrently (synchronously)

Other minor changes:

  1. Changed name of daemon function to mount_disk

  2. Added some comments to mount_disk

Notes:

  1. Still following the process::exit pattern, though I think that's not needed now, can just return a Result from main() itself, instead of explicitly using process::exit(0) and process::exit(1)
  2. Removes two usages of unsafe

Fixes #40 (closed)

Edited Mar 18, 2022 by Aditya Gupta
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fork_pipe