Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • cmucl cmucl
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 56
    • Issues 56
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 8
    • Merge requests 8
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • cmucl
  • cmuclcmucl
  • Issues
  • #26
Closed
Open
Issue created Aug 03, 2016 by Elias Pipping@epippingContributor

The cmucl that never sleeps

There's something odd going on with ext:run-program and sleep. Please consider the following snippet (considerably reduced from what I started with):

#+clozure (use-package :ccl)
#+cmu (use-package :ext)
#+sbcl (use-package :sb-ext)

(time (sleep 5))
(let ((p (run-program "/usr/bin/env" '("sleep" "1") :wait nil)))
  (declare (ignore p))
  (time (sleep 5)))

For me, this prints:

; Evaluation took:
;   5.01 seconds of real time
;   0.0 seconds of user run time
;   0.0 seconds of system run time
;   16,479,138,228 CPU cycles
;   0 page faults and
;   0 bytes consed.
; 

; Evaluation took:
;   1.02 seconds of real time
;   0.0 seconds of user run time
;   0.0 seconds of system run time
;   3,340,346,852 CPU cycles
;   0 page faults and
;   8 bytes consed.
; 

But that doesn't make any sense. A 5-second sleep should always take 5 seconds. Somehow the background process is interfering with sleep. The issue is with sleep, not with time here: The whole script returns a lot earlier than it should. With SBCL and Clozure CL, both sleeps take 5 seconds each.

Assignee
Assign to
Time tracking