[PATCH for vm-scalability] usemem.c: do_units: Add output before sigsuspend

From: Hui Zhu
Date: Mon May 30 2022 - 05:30:51 EST


From: Hui Zhu <teawater@xxxxxxxxxxxx>

It is hard to make sure that the process is waiting for the signal
without any output.
This commit add output before sigsuspend in do_units to handle this
issue.

Signed-off-by: Hui Zhu <teawater@xxxxxxxxxxxx>
---
usemem.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/usemem.c b/usemem.c
index 3b4d207..2f100e1 100644
--- a/usemem.c
+++ b/usemem.c
@@ -800,6 +800,8 @@ long do_units(void)

if (opt_write_signal_read) {
sigset_t set;
+ printf("Process %d is waiting signal\n", getpid());
+ fflush(stdout);
sigfillset(&set);
sigdelset(&set, SIGUSR1);
sigsuspend(&set);
--
1.8.3.1