mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
test-skeleton.c: Add write_message function
This commit is contained in:
@ -44,6 +44,9 @@ enum { malloc_maximum_size = 70000 };
|
||||
/* How many signals need to be delivered before the test exits. */
|
||||
enum { signal_count = 1000 };
|
||||
|
||||
static int do_test (void);
|
||||
#define TEST_FUNCTION do_test ()
|
||||
#include "../test-skeleton.c"
|
||||
|
||||
/* Process ID of the subprocess which sends SIGUSR1 signals. */
|
||||
static pid_t sigusr1_sender_pid;
|
||||
@ -56,14 +59,6 @@ static volatile sig_atomic_t sigusr1_received;
|
||||
progress. Checked by liveness_signal_handler. */
|
||||
static volatile sig_atomic_t progress_indicator = 1;
|
||||
|
||||
/* Write the message to standard output. Usable from signal
|
||||
handlers. */
|
||||
static void
|
||||
write_message (const char *str)
|
||||
{
|
||||
write (STDOUT_FILENO, str, strlen (str));
|
||||
}
|
||||
|
||||
static void
|
||||
sigusr1_handler (int signo)
|
||||
{
|
||||
@ -213,6 +208,3 @@ do_test (void)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define TEST_FUNCTION do_test ()
|
||||
#include "../test-skeleton.c"
|
||||
|
Reference in New Issue
Block a user