Hi!
> aio_suspend may be interrupted by IO request's completion signal, so we
> should use aio_error instead signal hander to check whether this request
> has complete.

This seems reasonable, as in the original code any aio_read could send
the signal that could interrupt aio_suspend (and even completion of the
aio request we are waiting for could interrupt it with signal).

And as I quick looked at the code and there is more to fix:

Bugs:

* relying on write() writing the whole buffer

* not checking malloc() return value


Conding style issues:

* bunch of useless pointer cast

* spaces between function names and () (all free (..), malloc (...) ...)

-- 
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to