Giter Site home page Giter Site logo

envp PWD= about apitrace HOT 7 CLOSED

apitrace avatar apitrace commented on May 14, 2024
envp PWD=

from apitrace.

Comments (7)

zackr avatar zackr commented on May 14, 2024

I'm sorry, I don't understand. What is this about?

from apitrace.

dacresni avatar dacresni commented on May 14, 2024

there is a line in the master branch of your os_posix.cpp file of apitrace and I was giving you a posix portable way to get the absolute path of the executable sense there's a comment requesting it on line 64. You just have to concatenate the PWD environmental variable with argv[0] of your argument vector to get the absolute path. (Instead of trying to read the proc file system) I was going to provide example code but i didn't want to forget. // http://stackoverflow.com/questions/1023306/finding-current-executables-path-without-proc-self-exe.

from apitrace.

zackr avatar zackr commented on May 14, 2024

Ah, no, that's not what it is. The code in question is also in a library, which doesn't have the access the argv vector so we can't rely on it.

from apitrace.

dacresni avatar dacresni commented on May 14, 2024

but getenv should work, shouldn't it?

On Thu, Apr 28, 2011 at 10:40 PM, zackr <
[email protected]>wrote:

Ah, no, that's not what it is. The code in question is also in a library,
which doesn't have the access the argv vector so we can't rely on it.

Reply to this email directly or view it on GitHub:
#11 (comment)

"lalalalala! it's not broken because I can use it"

http://linux.slashdot.org/comments.pl?sid=194281&threshold=1&commentsort=0&mode=thread&cid=15927703

from apitrace.

zackr avatar zackr commented on May 14, 2024

No, there's no env variable for the currently running process name.

from apitrace.

dacresni avatar dacresni commented on May 14, 2024

have you tried it? That behavior seems contrary to posix. http://publib.boulder.ibm.com/infocenter/zos/v1r10/index.jsp?topic=/com.ibm.zos.r10.bpxbd00/getenv.htm
I just think it would be strange if it didn't work. This isn't just a GNU libC thing, its a posix thing.

from apitrace.

zackr avatar zackr commented on May 14, 2024

Tried what? What behavior? That environment doesn't have a variable holding currently running process name? It never did.

from apitrace.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.