Seemingly simple shell commands taking forever

58 views
Skip to first unread message

techwhizbang

unread,
Jan 18, 2012, 4:35:55 PM1/18/12
to Clojure
I am using lein run -m to execute a simple database preparation task.
I issue 2 very simple commands that execute very fast on their on own
when executed in the shell. They also appear to execute very fast
based on the print output to stdout. However, the problem is that
after executing the 2 clojure.java.shell sh commands the process hangs
on way after it completes. So much so that it feels wrong.

Here is the gist. https://gist.github.com/1635837

PS I stripped down the database credentials so that it would be easily
runnable on anyone's machine so don't bother flaming me for using the
root user.

Phil Hagelberg

unread,
Jan 20, 2012, 5:28:06 PM1/20/12
to clo...@googlegroups.com
techwhizbang <techwh...@gmail.com> writes:

> I am using lein run -m to execute a simple database preparation task.
> I issue 2 very simple commands that execute very fast on their on own
> when executed in the shell. They also appear to execute very fast
> based on the print output to stdout. However, the problem is that
> after executing the 2 clojure.java.shell sh commands the process hangs
> on way after it completes. So much so that it feels wrong.
>
> Here is the gist. https://gist.github.com/1635837

The agent thread pool is probably keeping the process open. Try calling
(shutdown-agents) when you're done.

This is a long-standing known bug/shortcoming in Clojure:

http://dev.clojure.org/jira/browse/CLJ-124

-Phil

techwhizbang

unread,
Jan 21, 2012, 12:25:19 AM1/21/12
to Clojure
Thanks Phil, that was it exactly. Duly noted!

On Jan 20, 2:28 pm, Phil Hagelberg <p...@hagelb.org> wrote:
> techwhizbang <techwhizb...@gmail.com> writes:
> > I am using lein run -m to execute a simple database preparation task.
> > I issue 2 very simple commands that execute very fast on their on own
> > when executed in the shell. They also appear to execute very fast
> > based on the print output to stdout. However, the problem is that
> > after executing the 2 clojure.java.shell sh commands the process hangs
> > on way after it completes. So much so that it feels wrong.
>
> > Here is the gist.https://gist.github.com/1635837
Reply all
Reply to author
Forward
0 new messages