3 messages in net.sourceforge.lists.courier-usersRe: [courier-users] Oooops (minor bug...
FromSent OnAttachments
Alessandro VeselyAug 7, 2006 7:10 am 
Sam VarshavchikAug 7, 2006 3:46 pm 
Alessandro VeselyAug 7, 2006 10:04 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [courier-users] Oooops (minor bug in rw_local_filter)Actions...
From:Sam Varshavchik (mrs@courier-mta.com)
Date:Aug 7, 2006 3:46:43 pm
List:net.sourceforge.lists.courier-users

Alessandro Vesely writes:

Sorry, I meant

Nope, I don't think you meant this either.

--- courier/module.local/local.original.c 2006-05-28 17:29:52.000000000 +0200 +++ courier/module.local/local.c 2006-08-07 16:08:02.727499591 +0200 @@ -693,13 +693,16 @@ if (pid == 0) { char *argv[11]; + int fd0 = fd;

close(0); - if (fd < 0) - open("/dev/null", O_RDONLY); - else - dup2(fd, 0); - close(fd); + if (fd0 < 0) + fd0 = open("/dev/null", O_RDONLY); + if (fd0) + { + dup2(fd0, 0); + close(fd0); + } dup2(p[1], 1); dup2(p[1], 2); close(p[0]);