]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: Use /dev/zero instead of /dev/stderr in test-istream-unix unit test
authorTimo Sirainen <tss@iki.fi>
Thu, 14 May 2015 20:49:12 +0000 (23:49 +0300)
committerTimo Sirainen <tss@iki.fi>
Thu, 14 May 2015 20:49:12 +0000 (23:49 +0300)
Some distros don't seem to allow opening stderr.

src/lib/test-istream-unix.c

index 05957307eabebff187d6b2311f1a11edc420f562..b31fb86fb33c351a18fe2a415127e4553494b050 100644 (file)
@@ -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()) {