Heikki Linnakangas <heikki.linnakan...@enterprisedb.com> writes: > The open() fails and returns a return code as you would expect. But the > dup2() call crashes when passed an invalid file descriptor, I just > tested that with a small test program on Windows.
Ah, thanks Windows :-( > ! if (fd != -1) > ! { > ! dup2(fd, fileno(stdout)); > ! dup2(fd, fileno(stderr)); > ! close(fd); > ! } +1 for fixing it like this. It's cleaner anyway. Is that actually the cause of the original bug report, or is there another issue yet to solve? regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs