I am running a long linux program in a remote machine, and I want to stop it, but my problem is that if I use the kill command then the program will exit without saving resu
Here's an example for mongod
To start the daemon from the command line:
mongod &
Then later
kill -SIGINT `pgrep mongod`