Modify ↓
Opened at 2009-01-04T21:51:55Z
Closed at 2010-03-14T16:36:49Z
#476 closed defect (fixed)
forked process should unconditionally close fd 0-2
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | BitlBee | Version: | devel |
Keywords: | Cc: | ||
IRC client+version: | Client-independent | Operating System: | Public server |
OS version/distro: |
Description
Hello,
I was observing that when starting a bitlbee process from my crontab, a zombie process was being left around.
This happens because the forked process in bitlbee_daemon_init() only closes file descriptors 0 to 2 if they are a tty. However, for processes started from cron those file descriptors are pipes, but they should be closed nevertheless.
I've verified that removing the three "isatty" calls fixes the issue. I'm not sure, given the comment, what side-efects this could have.
Thanks for considering.
Attachments (0)
Change History (2)
comment:1 Changed at 2010-03-14T16:25:46Z by
comment:2 Changed at 2010-03-14T16:36:49Z by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Congratulations, this is fixed in CL changeset:devel,500 :-)
Note: See
TracTickets for help on using
tickets.
Hey Dato!
I'm not sure why the isatty() calls are there anyway, but I think it's related to the forkdaemon RESTART command, to avoid accidentally closing sockets to real users.
A work-around would be to close them but reopen them to /dev/null though, so that it's always safe to close them.