diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc
index d61ee7e8079589b63f92c15b9738a889da481392..7b74d99b19f437ee151aef709f087ab0fe3507da 100644
--- a/src/libexpr/eval.cc
+++ b/src/libexpr/eval.cc
@@ -63,6 +63,8 @@ void Bindings::sort()
 
 static void printValue(std::ostream & str, std::set<const Value *> & active, const Value & v)
 {
+    checkInterrupt();
+
     if (active.find(&v) != active.end()) {
         str << "<CYCLE>";
         return;