How to perform strace on shell without changing your current shell?
0
votes
1
answer
298
views
I use
strace
to trace the behavior of a bash
process. The purpose is to find out the order bash
loads its configuration files.
I am running the following command under zsh
:
strace -e openat bash
After running this command, I end up in a new bash
shell, but I don't want that to happen. Is there any way to trace the bash
command without actually starting new bash
interactive shell?
I searched online but couldn't find anything. I was trying this with exec
: strace -e openat "$(exec bash)" 2>&1
, but still my shell changes to bash
from zsh
.
Asked by Visrut
(137 rep)
Jan 23, 2024, 11:41 AM
Last activity: Jan 23, 2024, 01:08 PM
Last activity: Jan 23, 2024, 01:08 PM