Skip to main content

java.lang.Process exits with different return code on 1.6 vs 1.7.0-b146

2 replies [Last post]
krosenvold
Offline
Joined: 2007-10-02
Points: 0

I work on apache maven, and I see that a fork command using java.lang.Process returns a different result on latest 1.7 vs 1.6. The command being forked is (quotes preserved exactly)

cmd.exe /X /C "git rev-parse --verify HEAD"

The command is excuted through Runtime.getRuntime().exec() and consistently returns process return code of 1 on 1.7 while it's "0" on 1.6.

This is part of a platform-specific forking logic that in a component called plexus-utils that is part of all maven builds.

Doeas anyone know if this is a known change, a bug or if I should file a bug ?

Kristian Rosenvold

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
krosenvold
Offline
Joined: 2007-10-02
Points: 0

It seems to fail on windows xp.

alanb
Offline
Joined: 2005-08-08
Points: 0

Does this happen with jdk7-b147? The only bug that comes to mind is 7034570 which ensurest that SystemRoot is set in the child process. That issue was fixed in jdk7-b142. If you still see the problem with the latest jdk7 build then can you submit a bug with a test case to bugs.sun.com.