Uploaded image for project: 'Clojure'
  1. CLJ-959

after call to clojure.java.shell/sh, jvm won't exit

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects versions: Release 1.4, Release 1.3
    • Fix versions: None
    • Labels:
    • Environment:

      Reproduced on Ubuntu using Sun Java 1.6, OpenJDK 1.6, and Sun Java 1.7

      Description

      Create the following four-line file, shell_example.clj:

      ;; simple example of call to sh that causes jvm to hang after print
      (require '[clojure.java.shell :as shell])
      (shell/sh "ls")
      (println "jvm should exit after this, but it doesn't")

      Run:
      java -jar clojure-1.3.0.jar shell_example.clj

      After the message is printed, the jvm doesn't quit. It just sits there. I have to hit Ctrl-C to force the jvm to quit.

      This happens on 1.3 and the most recent code in github as of 3/26/2012. I imagine the jvm is waiting for a thread that hasn't terminated, but the code in the sh function doesn't look like it's doing anything obviously wrong. I'm too much of a newcomer to Clojure to dig any deeper.

      My workaround right now is to do (System/exit 0) to force the jvm to quit.

      Thank you for your work on Clojure, it's simply an amazing language.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              alex+import import
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: