mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 12:43:09 +00:00
add debug command: exit
This commit is contained in:
@@ -7,8 +7,10 @@ Dev version
|
|||||||
* Don't check imported function in snax.hotfix
|
* Don't check imported function in snax.hotfix
|
||||||
* snax service add change SERVICE_PATH and add it to package.path
|
* snax service add change SERVICE_PATH and add it to package.path
|
||||||
* skynet.redirect support string address
|
* skynet.redirect support string address
|
||||||
|
* bugfix: skynet.harbor.link may block
|
||||||
* add skynet.harbor.queryname to query globalname
|
* add skynet.harbor.queryname to query globalname
|
||||||
* add cluster.proxy
|
* add cluster.proxy
|
||||||
|
* add DEBUG command exit (send a message to lua service by DEBUG)
|
||||||
|
|
||||||
v0.5.2 (2014-8-11)
|
v0.5.2 (2014-8-11)
|
||||||
-----------
|
-----------
|
||||||
|
|||||||
@@ -39,6 +39,10 @@ function dbgcmd.INFO()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function dbgcmd.EXIT()
|
||||||
|
skynet.exit()
|
||||||
|
end
|
||||||
|
|
||||||
local function _debug_dispatch(session, address, cmd, ...)
|
local function _debug_dispatch(session, address, cmd, ...)
|
||||||
local f = dbgcmd[cmd]
|
local f = dbgcmd[cmd]
|
||||||
assert(f, cmd)
|
assert(f, cmd)
|
||||||
|
|||||||
@@ -106,6 +106,7 @@ function COMMAND.help()
|
|||||||
list = "List all the service",
|
list = "List all the service",
|
||||||
stat = "Dump all stats",
|
stat = "Dump all stats",
|
||||||
info = "Info address : get service infomation",
|
info = "Info address : get service infomation",
|
||||||
|
exit = "exit address : kill a lua service",
|
||||||
kill = "kill address : kill service",
|
kill = "kill address : kill service",
|
||||||
mem = "mem : show memory status",
|
mem = "mem : show memory status",
|
||||||
gc = "gc : force every lua service do garbage collect",
|
gc = "gc : force every lua service do garbage collect",
|
||||||
|
|||||||
@@ -56,6 +56,11 @@ function command.KILL(_, handle)
|
|||||||
return ret
|
return ret
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function command.EXIT(_, handle)
|
||||||
|
handle = handle_to_address(handle)
|
||||||
|
skynet.send(handle, "debug", "EXIT")
|
||||||
|
end
|
||||||
|
|
||||||
function command.MEM()
|
function command.MEM()
|
||||||
local list = {}
|
local list = {}
|
||||||
for k,v in pairs(services) do
|
for k,v in pairs(services) do
|
||||||
|
|||||||
Reference in New Issue
Block a user