Skip to content

Commit

Permalink
Switch to killing cshark with -TERM instead of -INT
Browse files Browse the repository at this point in the history
Killing the cshark program by sending the -INT signal was no longer
working and cshark would keep running indefinitely. Changing this to
kill cshark with the -TERM signal did kill cshark and still cleaned up
all of the temporary files in /tmp, pid file, capture file, and cshark
stdout file. The LuCI interface also printed out the correct information
and added the uploaded capture to the list of uploaded captures.
  • Loading branch information
Thomas Peterson committed Nov 23, 2015
1 parent 2b82f8c commit 6dd2f97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openwrt/luci/luasrc/controller/cshark.lua
Expand Up @@ -64,7 +64,7 @@ function cshark_iface_dump_stop()
local pid = f:read("*all")
io.close(f)

local res = os.execute("kill -INT " .. pid)
local res = os.execute("kill -TERM " .. pid)
luci.http.write(tostring(res))
end

Expand Down

0 comments on commit 6dd2f97

Please sign in to comment.