[SERVER-2312] Mongo keeps standard output open when --fork used Created: 30/Dec/10 Updated: 12/Jul/16 Resolved: 30/Dec/10 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Roger Bodamer (Inactive) | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Solaris |
||
| Operating System: | ALL |
| Participants: |
| Description |
|
[from jfeibusc@ebay.com; john feibusch] When you start Mongo with the --fork option, it keeps a connection to the terminal. That means that if you have started Mongo from an ssh session, then ssh will not close normally. It would be nice if you could make it so that ssh will close normally after starting Mongo in the background. On Solaris, I had to do a double-fork to accomplish this - fork, close standard input,output, and error, then fork again. The middle process would then exit. I'm not sure if this is necessary on Linux. Here's a session log: [root@qa-nosql01 ~]# /opt/mongodb/bin/mongod --version [root@qa-nosql07 ~]# /opt/mongodb/bin/mongod --dbpath /data/db/config --replSet johnf --fork --logpath /data/db/log/mongo.log [root@qa-nosql07 ~]# ls -l /proc/27523/fd [root@qa-nosql07 ~]# tty |
| Comments |
| Comment by Roger Bodamer (Inactive) [ 30/Dec/10 ] |
|
awesome.. will pass that along |
| Comment by Eliot Horowitz (Inactive) [ 30/Dec/10 ] |
|
This was fixed somewhere in 1.6 |