Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6542353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:12:59+00:00 2026-05-25T11:12:59+00:00

In a new fresh leiningen project, with its core.clj containing (defn show-cmd [] (->

  • 0

In a new fresh leiningen project, with its core.clj containing

(defn show-cmd
  []
  (-> (shell/sh "ls")
    :out
    println))

(defn -main
  []
  (.start (Thread. show-cmd)))

See https://gist.github.com/1183753 for the complete picture.

So, I get a RejectedExecutionException thrown when I do a lein run on the above project. The complete stack trace is in the gist.

However, the above works just fine when put in a .clj file and run directly with clojure, without leiningen in the workflow. Is this a bug in leiningen/clojure or is it just me?

If its a bug, please let me know how I can let the concerned know, as this would be the first time I’ve found a bug 🙂

Thanks.

Update Taking @skuro’s suggestion, I tried my example with the master branch clone of leiningen, but I still get the same error, as illustrated here

Leiningen error

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T11:13:00+00:00Added an answer on May 25, 2026 at 11:13 am

    This is a known problem with Leiningen which unfortunately won’t be fixed soon. Fixing it would cause other stuff to break. The workaround is to force the main function to never return:

    (defn -main
      []
      (.start (Thread. show-cmd))
      @(promise))
    

    Here, since the promise is never fulfilled, main will wait forever, thus preventing Leiningen from shutting down the executors that run agents, futures, etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When designing database tables for a fresh new project, is it good practice to
On my fresh new grails project, I installed shiro ( grails install-plugin shiro )
I needed to start fresh with a new MVC 2 Project This is what
I am fresh out of college and I've been put on a project using
I'm starting on a fresh new project--should I look at my spec and decide
I created a fresh project using rails new Project -d=postgresql. If I then run
Under rails 3.1 If I create a fresh new rails project, and scaffold a
Installed a fresh Delphi xe2. Open a new project (vcl forms application). opened the
I have a RHEL 5 system with a fresh new hard drive I just
if you run this snippet of code(put it in form1) in a fresh new

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.