Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run exe in mono in the background

Okay, so I have a .net exe, and it runs when I type mono myexe.exe. However, if I want to use another command or close the terminal window the app stops executing.

I have tried using mono myexe.exe & and it runs and showing [8] 20078 etc., but once I type something else it shows [8]+ Stopped, and then executes the command I typed in.

Any ideas?

like image 318
Josh Avatar asked Jan 18 '23 16:01

Josh


2 Answers

how about nohup mono myexe.exe &

like image 83
lidaobing Avatar answered Jan 27 '23 11:01

lidaobing


If you want to use & then look into outputting the result to a file.

nohup mono program.exe > program.out &

The right way of doing this would be to create a daemon with your linux distro.

like image 27
Rick Avatar answered Jan 27 '23 13:01

Rick