I have a job, a Ruby script that I have created but using a lot of libraries so is complex to trace.
When I run it in a terminal like
ruby ./my_process
it works perfectly.
But when I launch it as
ruby ./my_process &
it stays in stopped status and it doesnt work as expected.
I have tried to use daemonize_spawn gem, Process.daemon or even to use fork inside the ruby code with similar results, the process does not work correctly.
Any idea of what can be happening?
I am using linux and ruby 1.9
Without knowing much about your application, I would guess it is stuck waiting for input on STDIN. One quick way to verify that would be to redirect some file to STDIN of your process, maybe like this :