On Fri, 12 Nov 2010, Bron Gondwana wrote: > Since that wasn't the issue - why on earth was it allowed to have fd 2 > in the first place? Is Cyrus closing fd 2, or is truss closing it?? That is the issue that caused the leaks into protstreams, AFAIK. It is always com-err writing to fd 2, and something unexpected being on fd 2. > open stderr? The function that's scribbling all over everything is com_err, > which is supposed to be a BSD error reporting library, it SHOULD know what > it's doing... It _will_ write to stderr (aka fd 2). If we want to be safe, we make sure fds 0-2 are sane, and we check when we open sockets/files that we did not get fds below 3... > Bron ( a while later, fd 2 gets re-used as the mailboxes.db handle, and hence > the mess is created ) Indeed. We *CANNOT* afford to have any files or sockets opened with fd 0, 1 or 2. We should core-dump immediately if that happens, I think. -- "One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh ---- Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/