Coder Social home page Coder Social logo

Comments (3)

Mmx233 avatar Mmx233 commented on August 17, 2024

golang 在 linux 下的 exec 实现会使用 clone 创建新进程,当主程序退出时子进程会变成孤儿进程并被 init 进程(进程号为 1)接管。如果你想让程序在终端关闭后继续运行的话,你可以使用 nohup 或者 screen 防止进程被结束。

如果你想查看登录情况,你可以使用 nohup 输出日志文件,或者使用 screen 恢复命令终端,或者编写 service 文件后使用 systemctl 查看日志

from bitsrunlogingo.

zipeilee avatar zipeilee commented on August 17, 2024

感谢回答!提一个小小的意见,或许可以把如何后台运行加在readme里?

from bitsrunlogingo.

Mmx233 avatar Mmx233 commented on August 17, 2024

bitsrun 里的 daemon 即不归规范也不好用,已经在新版本中移除。至于如何后台运行,那是每种操作系统的知识,不属于本项目的范畴,我不想放进 readme

from bitsrunlogingo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.