On 31/01/2012 3:28 AM, Dmitry Samersoff wrote:
On 2012-01-30 16:28, Staffan Larsen wrote:
2. If you decide to hardcode "/tmp" please, create a global constant
for it.

I don't agree that this would make the code easier to read or maintain.
I should, however, include a comment saying that the file is always in
/tmp regardless of the value of java.io.tmpdir.

Staffan: I still think changing the static field tmpdir to refer to "/tmp" is cleaner then putting "/tmp" in all the use-sites.

/tmp is common but not mandatory, especially if we speak about embedded
systems.

Dmitry: The point is that the VM will always put the file in /tmp. That's wrong but the issue here is making the management Java code match the hotspot code.

   Native code should use P_tmpdir constant from stdio.h rather than
hardcode "/tmp".

As we can't access it from java I recommend to create a global constant
somewhere to reduce possible future porting efforts.


Changing the tmpdir static would be a smaller fix, but all the cwd code
would then remain. Yes, HotSpot never writes to cwd.

I agree with Staffan, that looks for socket/door in cwd should be removed.

Ok, if it is never needed then remove it.

David

-Dmitry

Reply via email to