On Wed, Jan 25, 2006 at 02:34:23PM +0000, Emmanuel Dreyfus wrote:
> Here is the revelant code section:
> if ((dumpfd = mkstemp(newdumpfile)) == -1) {
> syslog(LOG_ERR, "mkstemp(\"%s\") failed: %s",
> newdumpfile, strerror(errno));
> exit(EX_OSERR);
> }
Crude untested hack:
#ifdef SOLARIS_FD_WORKARROUND
if (dumpfd > 255) {
int retries = 10;
while (dumpfd > 255) {
int lowfd;
lowfd = dup(dumpfd);
if (lowfd <= 255) {
(void)close(dupfd);
dupfd = lowfd;
break;
}
if (retries-- == 0) {
/* Handle error gracefully */
...
}
(void) usleep(10);
}
}
#endif /* SOLARIS_FD_WORKARROUND */
Kind regards
--
Matthias Scheler http://scheler.de/~matthias/Message
Re: [milter-greylist] milter-greylist-2.0.2 crash
2006-01-25 by Matthias Scheler
Attachments
- No local attachments were found for this message.