< prev index next >

src/jdk.incubator.jpackage/unix/native/libapplauncher/PosixPlatform.cpp

Print this page

        

@@ -92,14 +92,10 @@
     }
 
     return result;
 }
 
-void PosixPlatform::SetCurrentDirectory(TString Value) {
-    chdir(StringToFileSystemString(Value));
-}
-
 Module PosixPlatform::LoadLibrary(TString FileName) {
     return dlopen(StringToFileSystemString(FileName), RTLD_LAZY);
 }
 
 void PosixPlatform::FreeLibrary(Module AModule) {

@@ -210,14 +206,10 @@
                 exit(1);
             }
         } else if (count == 0) {
             // break;
         } else {
-            if (buffer[count - 1] == EOF) {
-                buffer[count - 1] = '\0';
-            }
-
             std::list<TString> output = Helpers::StringToArray(buffer);
             FOutput.splice(FOutput.end(), output, output.begin(), output.end());
             result = true;
         }
     }

@@ -308,11 +300,13 @@
     return FChildPID;
 }
 
 void PosixProcess::SetInput(TString Value) {
     if (FInputHandle != 0) {
-        write(FInputHandle, Value.data(), Value.size());
+        if (write(FInputHandle, Value.data(), Value.size()) < 0) {
+            throw Exception(_T("Internal Error - write failed"));
+        }
     }
 }
 
 std::list<TString> PosixProcess::GetOutput() {
     ReadOutput();
< prev index next >