Deferred email with remote protocol error in reply

Wesley Craig wes at umich.edu
Sat Oct 28 01:16:17 EDT 2006


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


More information about the Info-cyrus mailing list