Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在 Linux 下怎么后台运行? #101

Open
isgbuddy opened this issue Apr 25, 2021 · 2 comments
Open

在 Linux 下怎么后台运行? #101

isgbuddy opened this issue Apr 25, 2021 · 2 comments

Comments

@isgbuddy
Copy link

isgbuddy commented Apr 25, 2021

用 TCrossHttpServer 做了个 http 服务,打算在 ubuntu 下跑,现在在 shell 下直接跑没问题,但是加 & ,想在后台运行,跑不起来,这个怎么办?

try
with TAppServer.Create do
try
Start();
Writeln(APP_NAME, ' start at port: ', HttpServer.Port, ', IO threads: ',
HttpServer.IoThreads);
Writeln('Press Enter stop');
Readln;
Stop();
Writeln(APP_NAME, ' stopped');
Writeln('Press Enter exit');
Readln;
finally
Free;
end;
except
on E: Exception do
Writeln(APP_NAME + ' exception => ' + E.ClassName, ': ', E.Message);
end;

@fjfzeagle
Copy link

可以使用这个开源弄成守护程序: https://github.com/EvgeniyKorepov/LinuxDaemonNewStyle

@PassByYou888
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants