Timeout-lib, which interrupts everything, also systemcalls. It uses libc-alarm.
Find a file
2013-03-06 15:09:39 +01:00
lib Version bump to 0.1.1 2013-03-06 15:09:39 +01:00
test Version bump to 0.1.1 2013-03-06 15:09:39 +01:00
.document Initial commit to ruby-timeout-interrupt. 2013-03-06 10:18:40 +01:00
.gitignore license, tests, lib. 2013-03-06 11:58:33 +01:00
Gemfile license, tests, lib. 2013-03-06 11:58:33 +01:00
Gemfile.lock license, tests, lib. 2013-03-06 11:58:38 +01:00
LICENSE.txt Version bump to 0.1.1 2013-03-06 15:09:39 +01:00
Rakefile Version bump to 0.1.1 2013-03-06 15:09:39 +01:00
README.md Version bump to 0.1.1 2013-03-06 15:09:39 +01:00
VERSION Version bump to 0.1.1 2013-03-06 15:09:39 +01:00

timeout-interrupt

Works like ruby's timeout, but interrupts every call, also syscalls, which blocks the hole ruby-process.

It uses POSIX's alarm and traps ALRM-signals.

Known limitations bacause of alarm and ALRM are, that you can not use alarm or trap ALRM.

Do not forget, syscall can have allocated memory. If you interrupt a call, which can not free his allocations, you will have a memory leak. So, use it only, if your process did not live any longer or if you call something, which never allocate mem

Copyleft

Copyright (c) 2013 Denis Knauf. See LICENSE.txt for further details.