Skip to content

Commit

Permalink
'linux_terminate_crono'
Browse files Browse the repository at this point in the history
  • Loading branch information
ohiodn8 committed Dec 4, 2018
1 parent 30af4f6 commit 6deab66
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ mount Uzebba::Engine => "/uzebba"

<p><strong><u>For Windows</u>: </strong> when you start the rails server, the gem will open a new cmd minimized on the taskbar. When you stop the rails server the application will also close the minimized cmd. This is the gem's way of imitating a Linux background process to handle the crono process.</p>

<p><strong><u>For Linux</u>: </strong> when you start the rails server, the crono process will run in background. To stop the process via the terminal, you have to do <code>ps aux | grep crono</code> to view the crono pid, and <code>kill -s sigterm [pid]</code> to terminate the process.</p>
<p><strong><u>For Linux</u>: </strong> when you start the rails server, the crono process will run in background; and when you stop the rails server, the crono process should stop. [<strike>To stop the process via the terminal, you have to do <code>ps aux | grep crono</code> to view the crono pid, and <code>kill -s sigterm [pid]</code> to terminate the process.</strike>]</p>

<p><strong>Do not use in production.</strong></p>

Expand Down
3 changes: 3 additions & 0 deletions lib/uzebba/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ def do_at_exit(str1)
end
at_exit { system 'taskkill /FI "WindowTitle eq uzebba19crono*" /T /F' }
do_at_exit("***CRONO TERMINATED: ")
else
at_exit { Dir.chdir Rails.root
system 'rm tmp/pids/crono.pid' }
end

end
Expand Down
2 changes: 1 addition & 1 deletion lib/uzebba/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Uzebba
VERSION = '0.1.4'
VERSION = '0.1.5'
end

0 comments on commit 6deab66

Please sign in to comment.