From: Timo Sirainen Date: Thu, 14 May 2015 20:49:12 +0000 (+0300) Subject: lib: Use /dev/zero instead of /dev/stderr in test-istream-unix unit test X-Git-Tag: 2.2.18~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4e8dbd07007fc558697c9b579f999ef535d5157;p=thirdparty%2Fdovecot%2Fcore.git lib: Use /dev/zero instead of /dev/stderr in test-istream-unix unit test Some distros don't seem to allow opening stderr. --- diff --git a/src/lib/test-istream-unix.c b/src/lib/test-istream-unix.c index 05957307ea..b31fb86fb3 100644 --- a/src/lib/test-istream-unix.c +++ b/src/lib/test-istream-unix.c @@ -166,8 +166,8 @@ void test_istream_unix(void) test_begin("istream unix"); if ((send_fd = open("/dev/null", O_RDONLY)) == -1) i_fatal("open(/dev/null) failed: %m"); - if ((send_fd2 = open("/dev/stderr", O_WRONLY)) == -1) - i_fatal("open(/dev/stderr) failed: %m"); + if ((send_fd2 = open("/dev/zero", O_RDONLY)) == -1) + i_fatal("open(/dev/zero) failed: %m"); if (socketpair(AF_UNIX, SOCK_STREAM, 0, fd) < 0) i_fatal("socketpair() failed: %m"); switch (fork()) {