Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,824
    • Issues 4,824
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 447
    • Merge requests 447
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #17912

Closed
Open
Created Mar 11, 2020 by alexvieth@trac-alexvieth

interruptible file open

Motivation

When working with FIFOs, it's sometimes desirable to using a blocking open, so that it will wait until a writer appears. base offers this in GHC.IO.Handle.FD.openFileBlocking. However, that call is not interruptible. I've made a very simple single-threaded program which is intended to blocking-open a FIFO repeatedly as its main loop, and which should shut down on ctrl+c, but in order to get this I had to hack up my own special open and read calls where the open call is marked interruptible.

Proposal

Unless it's a bad idea, set the c_safe_open foreign call to interruptible and make it deal properly with asynchronous exceptions. Otherwise, offer a new way to get an interruptible blocking open.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking