How can I get the application name responsible for calling a function in runtime, this funtciton is defined in a library linked dynamically in C linux.
Asked
Active
Viewed 59 times
0
-
Add lines in the function itself that will print the executable name using one of the method from here: https://stackoverflow.com/questions/4031672/without-access-to-argv0-how-do-i-get-the-program-name – Eugene Sh. Jan 13 '22 at 16:28
-
Welcome to StackOverflow! Please take the [tour] to learn how this site works, and read "[ask]". Then come back and [edit] your question, please, and provide some more details what you want to do. It is not simply `argv[0]` of the `main()` function, is it? – the busybee Jan 13 '22 at 16:28
-
https://stackoverflow.com/questions/34915875/find-argc-and-argv-from-a-library – Hans Passant Jan 13 '22 at 16:29
-
https://linux.die.net/man/3/program_invocation_name – William Pursell Jan 13 '22 at 16:57