Timeout-lib, which interrupts everything, also systemcalls. It uses libc-alarm.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Denis Knauf aafc641f35 Version bump to 0.1.1 10 years ago
lib Version bump to 0.1.1 10 years ago
test Version bump to 0.1.1 10 years ago
.document Initial commit to ruby-timeout-interrupt. 10 years ago
.gitignore license, tests, lib. 10 years ago
Gemfile license, tests, lib. 10 years ago
Gemfile.lock license, tests, lib. 10 years ago
LICENSE.txt Version bump to 0.1.1 10 years ago
README.md Version bump to 0.1.1 10 years ago
Rakefile Version bump to 0.1.1 10 years ago
VERSION Version bump to 0.1.1 10 years ago

README.md

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.