Suppose this "say xyz" command runs a process for a very long period of
time then I want to:
1) stop/kill that process through rails code on click of button.
2) can I determine whether the system command is running properly and
not had hanged the system?
Suppose this "say xyz" command runs a process for a very long period of
time then I want to:
1) stop/kill that process through rails code on click of button.
2) can I determine whether the system command is running properly and
not had hanged the system
Am I missing something here, or are you trying to solve the halting
problem?
If you need to run commands in the background, a message queue is the way to go. Resque and resque-status offer you some ability to check in on the progress of background jobs, though if you’re shelling out you’d still need to have some way for your background worker to monitor the (forked) process, which depends on what exactly it is you’re doing.