// natRuntime.cc - Implementation of native side of Runtime class.
-/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation
+/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation
This file is part of libgcj.
#include <java/lang/Runtime.h>
#include <java/lang/UnknownError.h>
#include <java/lang/UnsatisfiedLinkError.h>
-#include <gnu/gcj/runtime/FileDeleter.h>
#include <gnu/gcj/runtime/FinalizerThread.h>
#include <java/io/File.h>
#include <java/util/TimeZone.h>
#include <java/lang/StringBuffer.h>
#include <java/lang/Process.h>
-#include <java/lang/ConcreteProcess.h>
#include <java/lang/ClassLoader.h>
+// It is convenient and safe to simply include all of these.
+#include <java/lang/Win32Process.h>
+#include <java/lang/EcosProcess.h>
+#include <java/lang/PosixProcess.h>
+
#include <jni.h>
#ifdef HAVE_PWD_H
\f
void
+java::lang::Runtime::runFinalizationForExit ()
+{
+ if (finalizeOnExit)
+ _Jv_RunAllFinalizers ();
+}
+
+void
java::lang::Runtime::exitInternal (jint status)
{
// Make status right for Unix. This is perhaps strange.
if (status < 0 || status > 255)
status = 255;
- if (finalizeOnExit)
- _Jv_RunAllFinalizers ();
-
- // Delete all files registered with File.deleteOnExit()
- gnu::gcj::runtime::FileDeleter::deleteOnExitNow ();
-
::exit (status);
}
{
#ifdef USE_LTDL
lt_dlinit ();
+ // Set module load path.
+ lt_dlsetsearchpath (_Jv_Module_Load_Path);
// Make sure self is opened.
lt_dlopen (NULL);
#endif
jstringArray env,
java::io::File *dir)
{
- return new java::lang::ConcreteProcess (cmd, env, dir);
+ return new _Jv_platform_process (cmd, env, dir);
}
jint