From 14699b6e371fa2dae3a989c9b1ead4f23a285545 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 23 Jun 2016 11:00:00 +0200 Subject: test-skeleton.c: Add write_message function --- test-skeleton.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test-skeleton.c') diff --git a/test-skeleton.c b/test-skeleton.c index a9ad4ab7e9..49808b3d85 100644 --- a/test-skeleton.c +++ b/test-skeleton.c @@ -115,6 +115,16 @@ xrealloc (void *p, size_t n) return p; } +/* Write a message to standard output. Can be used in signal + handlers. */ +static void +__attribute__ ((unused)) +write_message (const char *message) +{ + ssize_t unused __attribute__ ((unused)); + unused = write (STDOUT_FILENO, message, strlen (message)); +} + /* List of temporary files. */ struct temp_name_list { -- cgit v1.2.3-65-gdbad