Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions native-platform/src/main/cpp/win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include "net_rubygrapefruit_platform_internal_jni_PosixProcessFunctions.h"
#include "net_rubygrapefruit_platform_internal_jni_WindowsConsoleFunctions.h"
#include "net_rubygrapefruit_platform_internal_jni_WindowsFileFunctions.h"
#include "net_rubygrapefruit_platform_internal_jni_WindowsHandleFunctions.h"
#include "net_rubygrapefruit_platform_internal_jni_WindowsRegistryFunctions.h"

#define ALL_COLORS (FOREGROUND_BLUE | FOREGROUND_RED | FOREGROUND_GREEN)
Expand Down Expand Up @@ -940,35 +939,6 @@ Java_net_rubygrapefruit_platform_internal_jni_WindowsConsoleFunctions_clearToEnd
}
}

void uninheritStream(JNIEnv* env, DWORD stdInputHandle, jobject result) {
HANDLE streamHandle = GetStdHandle(stdInputHandle);
if (streamHandle == NULL) {
// We're not attached to a stdio (eg Desktop application). Ignore.
return;
}
if (streamHandle == INVALID_HANDLE_VALUE) {
mark_failed_with_errno(env, "could not get std handle", result);
return;
}
boolean ok = SetHandleInformation(streamHandle, HANDLE_FLAG_INHERIT, 0);
if (!ok) {
if (GetLastError() != ERROR_INVALID_PARAMETER && GetLastError() != ERROR_INVALID_HANDLE) {
mark_failed_with_errno(env, "could not change std handle", result);
}
}
}

JNIEXPORT void JNICALL
Java_net_rubygrapefruit_platform_internal_jni_WindowsHandleFunctions_markStandardHandlesUninheritable(JNIEnv* env, jclass target, jobject result) {
uninheritStream(env, STD_INPUT_HANDLE, result);
uninheritStream(env, STD_OUTPUT_HANDLE, result);
uninheritStream(env, STD_ERROR_HANDLE, result);
}

JNIEXPORT void JNICALL
Java_net_rubygrapefruit_platform_internal_jni_WindowsHandleFunctions_restoreStandardHandles(JNIEnv* env, jclass target, jobject result) {
}

HKEY get_key_from_ordinal(jint keyNum) {
return keyNum == 0 ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public <T extends NativeIntegration> T get(Class<T> type, NativeLibraryLoader na
return type.cast(new WindowsTerminals());
}
if (type.equals(ProcessLauncher.class)) {
return type.cast(new WrapperProcessLauncher(new WindowsProcessLauncher(new DefaultProcessLauncher())));
return type.cast(new WrapperProcessLauncher(new DefaultProcessLauncher()));
}
if (type.equals(SystemInfo.class)) {
return type.cast(new DefaultSystemInfo());
Expand Down

This file was deleted.

This file was deleted.

Loading