mongod fork vs nohup
- by Daniel Kitachewsky
I'm currently writing process management software. One package we use is mongo.
Is there any difference between launching mongo with
mongod --fork --logpath=/my/path/mongo.log
and
nohup mongod >> /my/path/mongo.log 2>&1 < /dev/null &
?
My first thought was that --fork could spawn more processes and/or threads, and I was suggested that --fork could be useful for changing the effective user (downgrading privileges). But we run all under the same user (process manager and mongod), so is there any other difference?
Thank you