Agent Smit
June 15th, 2010, 04:40 PM
Greetings,
I've recently been working on a small server/daemon and have come across a strange situation where stdin/fd0 is being closed. This of course returns fd0 to the file/socket descriptor "pool" which I was not expecting.
I have checked my code and am certain I have not close fd0. So this leads me to believe that the OS is closing it for some reason.
Now, I have already search Google but am most likely not using the correct search terms as I have not been able to find anything regarding this issue.
So...
Could any of you please point me in the right direction? Why would stdin be closed by the OS?
Thanks!
I've recently been working on a small server/daemon and have come across a strange situation where stdin/fd0 is being closed. This of course returns fd0 to the file/socket descriptor "pool" which I was not expecting.
I have checked my code and am certain I have not close fd0. So this leads me to believe that the OS is closing it for some reason.
Now, I have already search Google but am most likely not using the correct search terms as I have not been able to find anything regarding this issue.
So...
Could any of you please point me in the right direction? Why would stdin be closed by the OS?
Thanks!