How can a C/C++ program put itself into background?

前端 未结 20 1713
难免孤独
难免孤独 2020-12-09 18:16

What\'s the best way for a running C or C++ program that\'s been launched from the command line to put itself into the background, equivalent to if the user had launched fro

20条回答
  •  失恋的感觉
    2020-12-09 18:56

    Under Windows, the closing thing you're going to get to fork() is loading your program as a Windows service, I think.

    Here is a link to an intro article on Windows services... CodeProject: Simple Windows Service Sample

提交回复
热议问题