mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[platform] fixes for Linux restarter
- correct launcher script name - correct parent process termination condition on systemd-based systems
This commit is contained in:
@@ -9,7 +9,8 @@ import time
|
||||
if len(sys.argv) < 2:
|
||||
raise Exception('At least one argument expected')
|
||||
|
||||
while os.getppid() != 1:
|
||||
pid = os.getppid()
|
||||
while os.getppid() == pid:
|
||||
time.sleep(0.5)
|
||||
|
||||
if len(sys.argv) > 2:
|
||||
|
||||
@@ -34,12 +34,14 @@ import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
public class Restarter {
|
||||
private Restarter() { }
|
||||
|
||||
private static File getLauncherScript() {
|
||||
return new File(PathManager.getBinPath(), ApplicationNamesInfo.getInstance().getLowercaseProductName() + ".sh");
|
||||
String name = ApplicationNamesInfo.getInstance().getProductName().toLowerCase(Locale.US);
|
||||
return new File(PathManager.getBinPath(), name + ".sh");
|
||||
}
|
||||
|
||||
public static boolean isSupported() {
|
||||
|
||||
Reference in New Issue
Block a user