mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
c7e0312c65
The sleep implementation now properly handles signal interruptions from the sigalrm timer by using nanosleep with retry loop instead of usleep. This commit also makes sleep override mruby-sleep's implementation when both gems are loaded, providing task-aware sleep behavior. Changes: - replace usleep with nanosleep for signal-safe blocking sleep - add retry loop to handle eintr interruptions - use mrb_define_private_method_id for both sleep and sleep_ms - add time.h and presym.h headers Co-authored-by: Claude <noreply@anthropic.com>