Thanks to visit codestin.com
Credit goes to github.com

Skip to content

windows下,执行ctrl+c 会把后台的子进程退出 #9

@mutu1213

Description

@mutu1213

代码如下非常简单
`func main() {
xdaemon.Background(".log", true)
r := gin.New()
r.Handle("GET", "/test", test)
r.Run(":3333")
}

func test(ginCtx *gin.Context) {
ginCtx.AbortWithStatus(400)
}`
步骤
1 、在CMD中执行 test.exe后,显示
启动子进程成功: -> 1600
2、在CMD中键盘ctrl+c
3、pid为1600的子进程已退出

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions