Re: Deferred email with remote protocol error in reply

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 27 Oct 2006, at 16:00, Henrique de Moraes Holschuh wrote:
That said, just moving off 0,1,2 is not difficult. ... The ideal fix would be to have them be dynamic.

Ideally, 0, 1, and 2 should be reserved for stdin, stdout, and stderr. In an environment where std* don't make sense, i.e., daemons, they should still be reserved, since standard libraries occasionally try to use them. I'm not all that sure that moving off 0, 1, and 2 would be that easy. Take main() from master/service.c, where the accepted socket is dup2()'d 0, 1, and 2. imapd, pop3d, etc, seem to call prot_new() on the descriptors routinely. However, you'd also have to catch references to getpeername( 0, ... ), getsockname( 0, ... ), shutdown( 0 ), etc. In principal straightforward, but in practice there's a lot of code that would need to be reviewed & tested.

:wes
----
Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux