lkml.org 
[lkml]   [2022]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH for vm-scalability] usemem.c: do_units: Add output before sigsuspend
Date
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
\
 
 \ /
  Last update: 2022-05-30 11:31    [W:0.020 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site