Swoole how to run in the background

Source: Internet
Author: User
Keywords Php swoole
Tags php server
The service-side code is finished, PHP server.php is executed on the command line, but how can you keep running in the background? I closed the SSH client window, I can not connect to the back add a & also not, how to operate? R

Reply content:

The service-side code is finished, PHP server.php is executed on the command line, but how can you keep running in the background? I closed the SSH client window, I can not connect to the back add a & also not, how to operate? R

Screen PHP server.php

Daemon process. Set daemonize = 1 o'clock, the program will run in the background as a daemon. This key must be enabled for long-running server-side programs.

If the daemon is not enabled, the program will be terminated when the SSH terminal exits.

  • After the daemon is enabled, standard inputs and outputs are redirected to Log_file

  • If Log_file is not set, it will be redirected to/dev/null and all information on the print screen will be discarded

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.