Land #10309, PID check for self-migrate

4.x
William Vu 2018-07-17 14:33:32 -05:00 committed by Metasploit
parent ba3fa4bf91
commit fe13b00d84
No known key found for this signature in database
GPG Key ID: CDFB5FA52007B954
1 changed files with 5 additions and 0 deletions

View File

@ -1114,6 +1114,11 @@ class Console::CommandDispatcher::Core
end
end
if pid == server.pid
print_error("Process already running at PID #{pid}")
return
end
server ? print_status("Migrating from #{server.pid} to #{pid}...") : print_status("Migrating to #{pid}")
# Do this thang.