[P3L] [RFC]: open(foobar, O_CREAT | O_APPEND) returning fd 0
Brought to you by:
algernon
From: Gergely N. <8...@fr...> - 2001-05-02 09:28:11
|
Hi! I was trying to add support to pop3lite to log the ip of successful connections while I stumbled across this bug. If I try to open _any_ file after a connection is accepted, the fd I get is 0 (stdin), and errno is set to EBADFD. This only happens in standalone mode, so I think that the bug is in the code that accepts the connection and plays little games with the fds, but I'm not sure where is it exactly, and how could I fix it... If anyone happen to have any idea, please contact me. Thanks, Gergely Nagy \ mhp/|8] |