Skip to content

Commit

Permalink
Update logs
Browse files Browse the repository at this point in the history
  • Loading branch information
akash-akya committed Dec 17, 2024
1 parent be9fd4a commit 358e75b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/exile/watcher.ex
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,15 @@ defmodule Exile.Watcher do

dead? =
Enum.reduce_while(@term_seq, false, fn {signal, wait_time}, _dead? ->
Logger.debug("Sending signal: #{signal} with wait_time: #{wait_time}")
Nif.nif_kill(os_pid, signal)

# check process_status first before going to sleep
if process_dead?(os_pid, wait_time) do
Logger.debug("External program terminated successfully with signal: #{signal}")
{:halt, true}
else
Logger.debug("Failed to stop with signal: #{signal}, wait_time: #{wait_time}")
Logger.debug("Failed to stop with signal: #{signal}")
{:cont, false}
end
end)
Expand Down

0 comments on commit 358e75b

Please sign in to comment.