Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,322
    • Issues 4,322
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 357
    • Merge Requests 357
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #3878

Closed
Open
Opened Feb 12, 2010 by marcotmarcot@trac-marcotmarcot

doesFileExist doesn't work for some /dev files in ghc 6.12

Hi. I've noticed this with a program that checks for a lvm image. Here's the situation:

Prelude System.Directory> doesFileExist "/dev/null"
True
Prelude System.Directory> doesFileExist "/dev/stdin"
True
Prelude System.Directory> doesFileExist "/dev/sda0"
False
Prelude System.Directory> doesFileExist "/dev/zezinho/sid"
False

All of these files exist in my system:

marcot@zezinho:/dev$ ls -l null sda1 stdin zezinho/sid /proc/self/fd/0 mapper/zezinho-sid /dev/pts/5
crw--w---- 1 marcot tty    136, 5 Fev 12 09:09 /dev/pts/5
brw-rw---- 1 root   disk   254, 4 Fev 12 08:55 mapper/zezinho-sid
crw-rw-rw- 1 root   root     1, 3 Fev 12 08:33 null
lrwx------ 1 marcot marcot     64 Fev 12 09:09 /proc/self/fd/0 -> /dev/pts/5
brw-rw---- 1 root   disk     8, 1 Fev 12 08:55 sda1
lrwxrwxrwx 1 root   root       15 Fev 12 08:33 stdin -> /proc/self/fd/0
lrwxrwxrwx 1 root   root       21 Fev 12 08:55 zezinho/sid -> ../mapper/zezinho-sid
Edited Mar 09, 2019 by Ian Lynagh <igloo@earth.li>
Assignee
Assign to
6.12.2
Milestone
6.12.2
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#3878