* [PATCH for vm-scalability] usemem.c: do_units: Add output before sigsuspend
@ 2022-05-30 9:30 Hui Zhu
0 siblings, 0 replies; only message in thread
From: Hui Zhu @ 2022-05-30 9:30 UTC (permalink / raw)
To: wufengguang, linux-kernel; +Cc: Hui Zhu
From: Hui Zhu <teawater@antgroup.com>
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@antgroup.com>
---
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-05-30 9:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-30 9:30 [PATCH for vm-scalability] usemem.c: do_units: Add output before sigsuspend Hui Zhu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox