Re: RFR 9: 8034903: Add Logging of Process.start arguments and resulting pid

2014-02-15 Thread Alan Bateman
On 15/02/2014 18:27, Martin Buchholz wrote: : OK, so is this code for the benefit of real users or openjdk developers? If the latter, it doesn't pull its weight - Dude, you forgot to remove your printf debugging statements. If the former, this feature needs to be explained somewhere - your

Re: RFR 9: 8034903: Add Logging of Process.start arguments and resulting pid

2014-02-14 Thread Florian Weimer
On 02/13/2014 10:26 PM, roger riggs wrote: Having folks stumbling over process creation and problems of quoting, especially on windows, it seems useful to log the native commands and arguments. They are proposed to be logged using the PlatformLogger at Level.FINE which will not be logged by

Re: RFR 9: 8034903: Add Logging of Process.start arguments and resulting pid

2014-02-14 Thread Alan Bateman
On 14/02/2014 10:26, Florian Weimer wrote: It may make sense to expose something like getProcessID() to the public because it is independently useful on systems with /proc. Yes, this has been asked for many times. We have JEP 102 [1] that lists this and other Process topics that we'd like to

Re: RFR 9: 8034903: Add Logging of Process.start arguments and resulting pid

2014-02-14 Thread Daniel Fuchs
Hi Roger, I agree with Paul that using Objects.toString(environment) would be cleaner. Concerning the test, you may want to modify CheckHandler.publish to filter out any log record that doesn't come from your ProcessImpl classes. Something like: 175 @Override 176 public void

Re: RFR 9: 8034903: Add Logging of Process.start arguments and resulting pid

2014-02-14 Thread roger riggs
Thanks Paul, Daniel, Thanks for the suggestions, I updated the webrev. /othervm does seem to be needed to prevent this test from interfering or being interfered wit. Roger On 2/14/2014 6:06 AM, Daniel Fuchs wrote: Hi Roger, I agree with Paul that using Objects.toString(environment) would

Re: RFR 9: 8034903: Add Logging of Process.start arguments and resulting pid

2014-02-14 Thread roger riggs
Hi Florian, As for escaping, is there an existing API for encoding and decoding those? A human won't have trouble figuring out the few cases where there might be some ambiguity due to , in the string. The test will be more complicated as well and I think added that the extra complexity is not

Re: RFR 9: 8034903: Add Logging of Process.start arguments and resulting pid

2014-02-14 Thread Alan Bateman
On 14/02/2014 18:10, Martin Buchholz wrote: I'm not excited about having logging statements added throughout the jdk implementation. PlatformLogger is an implementation detail, so real users cannot benefit. Your OS should already provide facilities to let you trace process creation. E.g. on

RFR 9: 8034903: Add Logging of Process.start arguments and resulting pid

2014-02-13 Thread roger riggs
Hi, Having folks stumbling over process creation and problems of quoting, especially on windows, it seems useful to log the native commands and arguments. They are proposed to be logged using the PlatformLogger at Level.FINE which will not be logged by default. The environment is useful in

Re: RFR 9: 8034903: Add Logging of Process.start arguments and resulting pid

2014-02-13 Thread Paul Benedict
Roger, I only have two suggested improvements: 1) solaris/../ProcessImpl.java should use Objects.toString() rather than the tenary operator for a string choice. You did this alright in /windows/../ProcessImpl.java 2) /windows/../ProcessImpl.java doesn't need to specify null for