AnyEvent::Util::run_cmd "Bad symbol for filehandle"

Art Sackett asackett at gmx.com
Tue Aug 19 01:20:21 CEST 2014


On Mon, Aug 18, 2014 at 09:29:30AM +0200, Marc Lehmann wrote:

> If you mean that the program should have stopped, then you can override
> the $EV::DIED callback with a version that exits - by default EV reports
> runtime errors and continues.

Oh wow. This is the first time in who knows how long that I didn't bang
in 'use AnyEvent::Strict;' just out of habit. Yes, indeed, it was
running out of file handles because I misunderstood the documentation of
IO::AIO and was modifying the $data scalar in the callback of aio_read,
believing that the request was not at that point considered to be
outstanding. Luckily my WW-III hardware was connected to another machine
at the time so the disaster was contained locally.

What I was thinking, though, was that it might be nice to have the
condvar returned by run_cmd invoked with an indication of error when
things like that happen, if it's not a horribly complicated thing to
implement. With such a feature the caller would have an opportunity to
react rather than just lying around forever waiting for an event that
will never occur. I might be the only one in the history of the world
who'd want such a thing so I'm not complaining or even begging -- I just
thought it might be something to consider for some future rev.

Thanks, and be well!

-- 
Art Sackett
http://www.artsackett.com/



More information about the anyevent mailing list