annotate tests/test-pipe2.c @ 17363:5a51fb7777a9

sys_select, sys_time: port 2013-01-30 Solaris 2.6 fix to Cygwin Problem reported by Marco Atzeri in <http://lists.gnu.org/archive/html/bug-gnulib/2013-03/msg00000.html>. * lib/sys_select.in.h [HAVE_SYS_SELECT_H && _CYGWIN_SYS_TIME_H]: Simply delegate to the system <sys/select.h> in this case too. Also, pay attention to _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H only if OSF/1, since otherwise Cygwin breaks, and it doesn't seem to be needed on Solaris either. * lib/sys_time.in.h [_CYGWIN_SYS_TIME_H]: Simply delgate to the system <sys/time.h> in this case.
author Paul Eggert <eggert@cs.ucla.edu>
date Tue, 19 Mar 2013 09:08:47 -0700
parents e542fd46ad6f
children 344018b6e5d7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11871
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1 /* Test of pipe2.
17249
e542fd46ad6f maint: update all copyright year number ranges
Eric Blake <eblake@redhat.com>
parents: 16366
diff changeset
2 Copyright (C) 2009-2013 Free Software Foundation, Inc.
11871
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4 This program is free software; you can redistribute it and/or modify
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 it under the terms of the GNU General Public License as published by
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6 the Free Software Foundation; either version 3, or (at your option)
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 any later version.
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9 This program is distributed in the hope that it will be useful,
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 GNU General Public License for more details.
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14 You should have received a copy of the GNU General Public License
16366
bb182ee4a09d maint: replace FSF snail-mail addresses with URLs
Paul Eggert <eggert@cs.ucla.edu>
parents: 16214
diff changeset
15 along with this program; if not, see <http://www.gnu.org/licenses/>. */
11871
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17 #include <config.h>
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
19 #include <unistd.h>
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
20
12489
33ab12a7cea2 tests: add signature checks
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
21 #include "signature.h"
33ab12a7cea2 tests: add signature checks
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
22 SIGNATURE_CHECK (pipe2, int, (int[2], int));
33ab12a7cea2 tests: add signature checks
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
23
11871
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
24 #include <fcntl.h>
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
25 #include <stdbool.h>
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
26
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
27 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
16214
ec738d6aeef5 Talk about "native Windows API", not "Win32".
Bruno Haible <bruno@clisp.org>
parents: 16201
diff changeset
28 /* Get declarations of the native Windows API functions. */
11871
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
29 # define WIN32_LEAN_AND_MEAN
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
30 # include <windows.h>
15752
b86e9061a6d0 New module 'msvc-nothrow'. Makes _get_osfhandle safe on MSVC 9.
Bruno Haible <bruno@clisp.org>
parents: 14856
diff changeset
31 /* Get _get_osfhandle. */
b86e9061a6d0 New module 'msvc-nothrow'. Makes _get_osfhandle safe on MSVC 9.
Bruno Haible <bruno@clisp.org>
parents: 14856
diff changeset
32 # include "msvc-nothrow.h"
11871
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
33 #endif
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
34
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
35 #include "binary-io.h"
12496
a48d3d749ca5 Refactor common macros used in tests.
Bruno Haible <bruno@clisp.org>
parents: 12489
diff changeset
36 #include "macros.h"
14856
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
37 #if GNULIB_NONBLOCKING
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
38 # include "nonblocking.h"
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
39 #endif
11871
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
40
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
41 /* Return true if FD is open. */
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
42 static bool
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
43 is_open (int fd)
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
44 {
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
45 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
16214
ec738d6aeef5 Talk about "native Windows API", not "Win32".
Bruno Haible <bruno@clisp.org>
parents: 16201
diff changeset
46 /* On native Windows, the initial state of unassigned standard file
11871
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
47 descriptors is that they are open but point to an
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
48 INVALID_HANDLE_VALUE, and there is no fcntl. */
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
49 return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE;
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
50 #else
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
51 # ifndef F_GETFL
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
52 # error Please port fcntl to your platform
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
53 # endif
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
54 return 0 <= fcntl (fd, F_GETFL);
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
55 #endif
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
56 }
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
57
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
58 /* Return true if FD is not inherited to child processes. */
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
59 static bool
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
60 is_cloexec (int fd)
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
61 {
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
62 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
63 HANDLE h = (HANDLE) _get_osfhandle (fd);
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
64 DWORD flags;
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
65 ASSERT (GetHandleInformation (h, &flags));
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
66 return (flags & HANDLE_FLAG_INHERIT) == 0;
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
67 #else
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
68 int flags;
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
69 ASSERT ((flags = fcntl (fd, F_GETFD)) >= 0);
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
70 return (flags & FD_CLOEXEC) != 0;
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
71 #endif
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
72 }
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
73
14856
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
74 #if ! GNULIB_NONBLOCKING
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
75 static int
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
76 get_nonblocking_flag (int fd)
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
77 {
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
78 # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
79 return 0;
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
80 # else
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
81 # ifndef F_GETFL
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
82 # error Please port fcntl to your platform
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
83 # endif
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
84 int flags;
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
85 ASSERT ((flags = fcntl (fd, F_GETFL)) >= 0);
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
86 return (flags & O_NONBLOCK) != 0;
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
87 # endif
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
88 }
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
89 #endif
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
90
11871
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
91 int
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
92 main ()
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
93 {
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
94 int use_nonblocking;
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
95 int use_cloexec;
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
96
14856
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
97 for (use_nonblocking = 0; use_nonblocking <= !!O_NONBLOCK; use_nonblocking++)
14535
7ba508565384 pipe2: fix O_NONBLOCK support on mingw
Eric Blake <eblake@redhat.com>
parents: 14079
diff changeset
98 for (use_cloexec = 0; use_cloexec <= !!O_CLOEXEC; use_cloexec++)
11871
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
99 {
12421
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
100 int o_flags;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
101 int fd[2];
11871
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
102
12421
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
103 o_flags = 0;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
104 if (use_nonblocking)
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
105 o_flags |= O_NONBLOCK;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
106 if (use_cloexec)
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
107 o_flags |= O_CLOEXEC;
11871
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
108
12421
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
109 fd[0] = -1;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
110 fd[1] = -1;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
111 ASSERT (pipe2 (fd, o_flags) >= 0);
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
112 ASSERT (fd[0] >= 0);
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
113 ASSERT (fd[1] >= 0);
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
114 ASSERT (fd[0] != fd[1]);
13832
992d47604da1 tests: fix compiler warnings
Eric Blake <eblake@redhat.com>
parents: 13664
diff changeset
115 ASSERT (is_open (fd[0]));
992d47604da1 tests: fix compiler warnings
Eric Blake <eblake@redhat.com>
parents: 13664
diff changeset
116 ASSERT (is_open (fd[1]));
12421
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
117 if (use_cloexec)
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
118 {
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
119 ASSERT (is_cloexec (fd[0]));
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
120 ASSERT (is_cloexec (fd[1]));
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
121 }
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
122 else
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
123 {
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
124 ASSERT (!is_cloexec (fd[0]));
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
125 ASSERT (!is_cloexec (fd[1]));
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
126 }
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
127 if (use_nonblocking)
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
128 {
14535
7ba508565384 pipe2: fix O_NONBLOCK support on mingw
Eric Blake <eblake@redhat.com>
parents: 14079
diff changeset
129 ASSERT (get_nonblocking_flag (fd[0]) == 1);
7ba508565384 pipe2: fix O_NONBLOCK support on mingw
Eric Blake <eblake@redhat.com>
parents: 14079
diff changeset
130 ASSERT (get_nonblocking_flag (fd[1]) == 1);
12421
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
131 }
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
132 else
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
133 {
14535
7ba508565384 pipe2: fix O_NONBLOCK support on mingw
Eric Blake <eblake@redhat.com>
parents: 14079
diff changeset
134 ASSERT (get_nonblocking_flag (fd[0]) == 0);
7ba508565384 pipe2: fix O_NONBLOCK support on mingw
Eric Blake <eblake@redhat.com>
parents: 14079
diff changeset
135 ASSERT (get_nonblocking_flag (fd[1]) == 0);
12421
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
136 }
14535
7ba508565384 pipe2: fix O_NONBLOCK support on mingw
Eric Blake <eblake@redhat.com>
parents: 14079
diff changeset
137
7ba508565384 pipe2: fix O_NONBLOCK support on mingw
Eric Blake <eblake@redhat.com>
parents: 14079
diff changeset
138 ASSERT (close (fd[0]) == 0);
7ba508565384 pipe2: fix O_NONBLOCK support on mingw
Eric Blake <eblake@redhat.com>
parents: 14079
diff changeset
139 ASSERT (close (fd[1]) == 0);
11871
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
140 }
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
141
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
142 return 0;
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
143 }