gcc/libjava/java/lang/PosixProcess.h
David Daney 8c0dbf3490 re PR libgcj/29324 (add wait handling hook)
PR libgcj/29324
	* include/posix-threads.h (_Jv_BlockSigchld): Declare.
	(_Jv_UnBlockSigchld): Same.
	* posix-threads.cc: Include posix-threads.h.
	(block_sigchld) Rename to...
	(_Jv_BlockSigchld) ... this.
	(_Jv_UnBlockSigchld): New function.
	(_Jv_InitThreads): Call _Jv_BlockSigchld in place of block_sigchld.
	(_Jv_ThreadStart): Same.
	* java/lang/PosixProcess$ProcessManager.h: Regenerate.
	* java/lang/PosixProcess.java: Clean up imports.
	(ProcessManager): Make final.
	(ProcessManager.queue): Genericise and make private.
	(ProcessManager.pidToProcess): Remove.
	(ProcessManager.liveProcesses): New field.
	(ProcessManager.reaperPID): Remove.
	(ProcessManager.nativeData): New field.
	(ProcessManager.removeProcessFromMap): Remove.
	(ProcessManager.addProcessToMap):Remove.
	(ProcessManager.addToLiveProcesses): New method.
	(ProcessManager.run): Rewritten.
	(ProcessManager.reap): Change method signature,
	(getErrorStream): Correct formatting.
	(getInputStream): Same.
	(spawn): Add process to liveProcesses list.
	(pid): Make package private.
	* java/lang/PosixProcess.h: Regenerate.
	* java/lang/natPosixProcess.cc: Include posix.h and posix-threads.h.
	Add useing namespace java::lang.
	(ProcessManagerInternal): New struct.
	(sigchld_handler): Rewritten.
	(init): Rewritten.
	(waitForSignal): Same.
	(reap): Same.
	(signalReaper): Same.
	(nativeDestroy): Call kill as ::kill.
	(nativeSpawn): Correct formatting.
	* classpath/lib/java/lang/PosixProcess$EOFInputStream.class: Regenerate.
	* classpath/lib/java/lang/PosixProcess.class: Same.
	* classpath/lib/java/lang/PosixProcess$ProcessManager.class: Same.

From-SVN: r124638
2007-05-12 17:37:55 +00:00

63 lines
1.8 KiB
C++

// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_lang_PosixProcess__
#define __java_lang_PosixProcess__
#pragma interface
#include <java/lang/Process.h>
#include <gcj/array.h>
class java::lang::PosixProcess : public ::java::lang::Process
{
public:
void destroy();
private:
void nativeDestroy();
public:
jint exitValue();
public: // actually package-private
void processTerminationCleanup();
public:
::java::io::InputStream * getErrorStream();
::java::io::InputStream * getInputStream();
::java::io::OutputStream * getOutputStream();
jint waitFor();
public: // actually package-private
void spawn(::java::lang::PosixProcess$ProcessManager *);
private:
void nativeSpawn();
public: // actually package-private
PosixProcess(JArray< ::java::lang::String * > *, JArray< ::java::lang::String * > *, ::java::io::File *, jboolean);
static ::java::lang::Object * access$0();
static void access$1(::java::lang::PosixProcess$ProcessManager *);
private:
JArray< ::java::lang::String * > * __attribute__((aligned(__alignof__( ::java::lang::Process)))) progarray;
JArray< ::java::lang::String * > * envp;
::java::io::File * dir;
jboolean redirect;
::java::lang::Throwable * exception;
public: // actually package-private
jlong pid;
static const jint STATE_WAITING_TO_START = 0;
static const jint STATE_RUNNING = 1;
static const jint STATE_TERMINATED = 2;
jint state;
jint status;
private:
::java::io::InputStream * errorStream;
::java::io::InputStream * inputStream;
::java::io::OutputStream * outputStream;
::java::io::InputStream * returnedErrorStream;
::java::io::InputStream * returnedInputStream;
static ::java::lang::Object * queueLock;
static ::java::lang::PosixProcess$ProcessManager * processManager;
public:
static ::java::lang::Class class$;
};
#endif // __java_lang_PosixProcess__