[Haskell-cafe] trying to use unix's openFD ..
Galchin Vasili
vigalchin at gmail.com
Wed Jan 30 23:35:35 EST 2008
MY bad!!!
I was trying to open "/dev/cdrom/" and not "dev/cdrom"!!! and hence
"/dev/cdrom/" was correctly treated as a directory ...
Vasili
On Jan 30, 2008 11:25 PM, Brandon S. Allbery KF8NH <allbery at ece.cmu.edu>
wrote:
>
> On Jan 30, 2008, at 23:23 , Galchin Vasili wrote:
>
> > I am trying to do the following on RedHat RHEL 5.0:
> >
> > main = do
> > fs <- openFd "/dev/cdrom" ReadOnly (Just ???) defaultFileFlags
> > putStrLn (show fd)
> >
> > what should (Just ???) be ???
>
> I think you can pass Nothing instead of a Just, since that argument
> is ignored when opening read only. If you feel you need to pass
> something, use nullFileMode.
>
> --
> brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
> system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
> electrical and computer engineering, carnegie mellon university KF8NH
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20080130/4fd6c7c2/attachment.htm
More information about the Haskell-Cafe
mailing list