Is there a way to hold the finish of a program so that /proc/<pid>/maps
From:
Peng Yu
Subject:
Is there a way to hold the finish of a program so that /proc/<pid>/maps can be accessed?
Date:
Tue, 26 Jan 2021 00:17:14 -0600
Hi,
Once I run a program, I want be able to cat /proc/<pid>/maps (on
Linux). But the program may finish before /proc/<pid>/maps is
accessed.
Is there a way to hold the execuration of the program to give enough
time to access /proc/<pid>/maps? In terms of psuedo code (in one
script), it looks like something like this. Is there a way to do this?
Thanks.
start_and_hold_program myprog &
pid=$!
cat /proc/$pid/maps
let_it_finish $pid
--
Regards,
Peng