aboutsummaryrefslogtreecommitdiff
path: root/support/capture_subprocess.h
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2017-06-02 15:50:36 +0200
committerFlorian Weimer <fweimer@redhat.com>2017-06-02 15:50:36 +0200
commit2714c5f3c95f90977167c1d21326d907fb76b419 (patch)
tree5c3fc58f8177144973b0714aed382f8b32dadd84 /support/capture_subprocess.h
parent673cb072a4710bd4bf6029a062d2867cca929c43 (diff)
downloadglibc-2714c5f3c95f90977167c1d21326d907fb76b419.zip
glibc-2714c5f3c95f90977167c1d21326d907fb76b419.tar.gz
glibc-2714c5f3c95f90977167c1d21326d907fb76b419.tar.bz2
resolv: Tests for various versions of res_init
Diffstat (limited to 'support/capture_subprocess.h')
-rw-r--r--support/capture_subprocess.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/support/capture_subprocess.h b/support/capture_subprocess.h
index be5d34f..43caf9b 100644
--- a/support/capture_subprocess.h
+++ b/support/capture_subprocess.h
@@ -39,4 +39,23 @@ struct support_capture_subprocess support_capture_subprocess
support_capture_subprocess. */
void support_capture_subprocess_free (struct support_capture_subprocess *);
+enum support_capture_allow
+{
+ /* No output is allowed. */
+ sc_allow_none = 0x01,
+ /* Output to stdout is permitted. */
+ sc_allow_stdout = 0x02,
+ /* Output to standard error is permitted. */
+ sc_allow_stderr = 0x04,
+};
+
+/* Check that the subprocess exited with STATUS and that only the
+ allowed outputs happened. ALLOWED is a combination of
+ support_capture_allow flags. Report errors under the CONTEXT
+ message. */
+void support_capture_subprocess_check (struct support_capture_subprocess *,
+ const char *context, int status,
+ int allowed)
+ __attribute__ ((nonnull (1, 2)));
+
#endif /* SUPPORT_CAPTURE_SUBPROCESS_H */