Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in the Unix.sleep when used after Graphics.synchronize #3666

vicuna opened this issue May 27, 2005 · 2 comments


Copy link

commented May 27, 2005

Original bug ID: 3666
Reporter: administrator
Status: acknowledged
Resolution: open
Priority: normal
Severity: feature
Category: otherlibs
Monitored by: @Chris00

Bug description

Full_Name: Damien Bobillot
Version: 3.08.3
OS: Linux (Redhat & Gentoo)
Submission from: (

==== ====
Graphics.open_graph "";
Graphics.synchronize ();
Printf.printf "cou%!";
Unix.sleep 60;
Printf.printf "cou\n%!";

ocamlopt.opt -c test unix.cmxa graphics.cmxa

When running ./test, the program dont wait 1 minute between printf "cou" calls.

This bug doesn't appear in the Mac OS X version.

I've tried to block all signals (with Unix.sigprocmask Unix.SIG_SETMASK
[-1;-2;...;-20;-21]), but it doesn't solve anything.


This comment has been minimized.

Copy link

commented Jul 20, 2005

Comment author: administrator

It's not a bug, it's a SIGIO signal that interrupts Unix.sleep (under Unix --
MacOS X restarts the syscall). Feature wish: a Graphics library that does not
use signals (but e.g. threads).

@vicuna vicuna added the otherlibs label Mar 14, 2019

@nojb nojb added the graphics label Mar 16, 2019


This comment has been minimized.

Copy link

commented Mar 16, 2019

Since 4.07, Unix.sleep is resilient to interrupts. This seems to solve this old issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.