MM-14827 don't kill STDOUT for the server process (#10828)
Этот коммит содержится в:
коммит произвёл
Ben Schumacher
родитель
50e97bd9d3
Коммит
98f7bdcb43
4
Makefile
4
Makefile
@@ -361,11 +361,11 @@ ifeq ($(BUILDER_GOOS_GOARCH),"windows_amd64")
|
|||||||
wmic process where "Caption='go.exe' and CommandLine like '%go.exe run%'" call terminate
|
wmic process where "Caption='go.exe' and CommandLine like '%go.exe run%'" call terminate
|
||||||
wmic process where "Caption='mattermost.exe' and CommandLine like '%go-build%'" call terminate
|
wmic process where "Caption='mattermost.exe' and CommandLine like '%go-build%'" call terminate
|
||||||
else
|
else
|
||||||
@for PID in $$(ps -ef | grep "[g]o run" | awk '{ print $$2 }'); do \
|
@for PID in $$(ps -ef | grep "[g]o run" | grep "disableconfigwatch" | awk '{ print $$2 }'); do \
|
||||||
echo stopping go $$PID; \
|
echo stopping go $$PID; \
|
||||||
kill $$PID; \
|
kill $$PID; \
|
||||||
done
|
done
|
||||||
@for PID in $$(ps -ef | grep "[g]o-build" | awk '{ print $$2 }'); do \
|
@for PID in $$(ps -ef | grep "[g]o-build" | grep "disableconfigwatch" | awk '{ print $$2 }'); do \
|
||||||
echo stopping mattermost $$PID; \
|
echo stopping mattermost $$PID; \
|
||||||
kill $$PID; \
|
kill $$PID; \
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ func runServer(configStore config.Store, disableConfigWatch bool, usedPlatform b
|
|||||||
|
|
||||||
// wait for kill signal before attempting to gracefully shutdown
|
// wait for kill signal before attempting to gracefully shutdown
|
||||||
// the running service
|
// the running service
|
||||||
signal.Notify(interruptChan, os.Interrupt, syscall.SIGINT, syscall.SIGTERM)
|
signal.Notify(interruptChan, os.Interrupt, syscall.SIGINT, syscall.SIGTERM, syscall.SIGPIPE)
|
||||||
<-interruptChan
|
<-interruptChan
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user