Hello,
Haskell 101 question! I discovered that aio_error returns "errno" rather
-1. Of course, my aio_error binding is called before my aio_return binding
(aio calling sequence "protocol"). I have worked on Posix OS's for quite a
while but am unhappy with non-consistent errno handling ;^(. In
On 2008 Jul 2, at 1:42, Galchin, Vasili wrote:
errno <- throwErrnoIfMinus1 "aioError" (c_aio_error p_aiocb)
"ghc" thinks that "Errno" should be an instance of "Num":
System/Posix/Aio.hsc:117:15:
No instance for (Num Errno)
I expect so it can compare it to -1(throwErrnoIfMinusOne)
On Wed, 2008-07-02 at 02:07 -0400, Brandon S. Allbery KF8NH wrote:
>
> On 2008 Jul 2, at 1:42, Galchin, Vasili wrote:
>
> > errno <- throwErrnoIfMinus1 "aioError" (c_aio_error p_aiocb)
> >
> > "ghc" thinks that "Errno" should be an instance of "Num":
> >
> > System/Posix/Aio.hsc:117:15:
On 2008 Jul 2, at 2:15, Jonathan Cast wrote:
It seems as though it can return -1 if given non-sensical input.
But in
The POSIX spec says it returns EINVAL in that case.
--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED]
system administrator [openafs,heimdal,too man
On Wed, 2008-07-02 at 02:17 -0400, Brandon S. Allbery KF8NH wrote:
> On 2008 Jul 2, at 2:15, Jonathan Cast wrote:
>
> > It seems as though it can return -1 if given non-sensical input.
> > But in
>
> The POSIX spec says it returns EINVAL in that case.
Are you sure? A little googling picks up
Thanks, Brandon!! I understand most of what you say but let me ponder!
Kind regards, Vasili
On Wed, Jul 2, 2008 at 1:07 AM, Brandon S. Allbery KF8NH <
[EMAIL PROTECTED]> wrote:
>
> On 2008 Jul 2, at 1:42, Galchin, Vasili wrote:
>
> errno <- throwErrnoIfMinus1 "aioError" (c_aio_error p_aio
On 2008 Jul 2, at 2:32, Jonathan Cast wrote:
On Wed, 2008-07-02 at 02:17 -0400, Brandon S. Allbery KF8NH wrote:
On 2008 Jul 2, at 2:15, Jonathan Cast wrote:
It seems as though it can return -1 if given non-sensical input.
But in
The POSIX spec says it returns EINVAL in that case.
Are you
Hi Brandon,
Most of what you say makes sense. However, at some places in your
narrative aren't you mixing up my aioError and aioReturn?(or aio_error and
aio_return, respectively). E.g. aioReturn should return the byte count and
not errno?
If you want to stick close to the C interface:
aioR