summaryrefslogtreecommitdiffstats
path: root/kdejava/koala/org/kde/koala/KProcess.java
diff options
context:
space:
mode:
Diffstat (limited to 'kdejava/koala/org/kde/koala/KProcess.java')
-rw-r--r--kdejava/koala/org/kde/koala/KProcess.java70
1 files changed, 35 insertions, 35 deletions
diff --git a/kdejava/koala/org/kde/koala/KProcess.java b/kdejava/koala/org/kde/koala/KProcess.java
index 641a1ff8..caad1555 100644
--- a/kdejava/koala/org/kde/koala/KProcess.java
+++ b/kdejava/koala/org/kde/koala/KProcess.java
@@ -26,14 +26,14 @@ import org.kde.qt.TQObject;
NotifyOnExit -- The child process is invoked and both the
child and the parent process run concurrently.
</li>
- When the child process exits, the KProcess instance
+ When the child process exits, the TDEProcess instance
corresponding to it emits the Qt signal processExited().
Since this signal is <b>not</b> emitted from within a UNX
signal handler, arbitrary function calls can be made.
- Be aware: When the KProcess object gets destructed, the child
+ Be aware: When the TDEProcess object gets destructed, the child
process will be killed if it is still running!
This means in particular, that it usually makes no sense to use
- a KProcess on the stack with NotifyOnExit.
+ a TDEProcess on the stack with NotifyOnExit.
<li>
OwnGroup -- like NotifyOnExit, but the child process is started
@@ -52,23 +52,23 @@ import org.kde.qt.TQObject;
In this mode the parent can read the child's output, but can't send it any
input.
</li>
- KProcess also provides several functions for determining the exit status
+ TDEProcess also provides several functions for determining the exit status
and the pid of the child process it represents.
Furthermore it is possible to supply command-line arguments to the process
in a clean fashion (no null-terminated stringlists and such...)
A small usage example:
<pre>
- KProcess proc = new KProcess;
+ TDEProcess proc = new TDEProcess;
proc << "my_executable";
proc << "These" << "are" << "the" << "command" << "line" << "args";
- TQApplication.connect(proc, SIGNAL("processExited(KProcess )"),
- pointer_to_my_object, SLOT("my_objects_slot(KProcess )"));
+ TQApplication.connect(proc, SIGNAL("processExited(TDEProcess )"),
+ pointer_to_my_object, SLOT("my_objects_slot(TDEProcess )"));
proc.start();
</pre>
This will start "my_executable" with the commandline arguments "These"...
When the child process exits, the slot will be invoked.
<li><b>Communication with the child process:</b></li>
- KProcess supports communication with the child process through
+ TDEProcess supports communication with the child process through
stdin/stdout/stderr.
The following functions are provided for getting data from the child
process or sending data to the child's stdin (For more information,
@@ -89,15 +89,15 @@ import org.kde.qt.TQObject;
You can shut down individual communication channels with
closeStdin(), closeStdout(), and closeStderr(), resp.
</li>
- See {@link KProcessSignals} for signals emitted by KProcess
+ See {@link TDEProcessSignals} for signals emitted by TDEProcess
@author Christian Czezatke e9025461@student.tuwien.ac.at
@short Child process invocation, monitoring and control.
@see KProcIO
*/
-public class KProcess extends TQObject {
- protected KProcess(Class dummy){super((Class) null);}
+public class TDEProcess extends TQObject {
+ protected TDEProcess(Class dummy){super((Class) null);}
/**
More or less intuitive constants for use with setPriority().
@short More or less intuitive constants for use with setPriority().
@@ -144,48 +144,48 @@ public class KProcess extends TQObject {
Constructor
@short Constructor
*/
- public KProcess(TQObject parent, String name) {
+ public TDEProcess(TQObject parent, String name) {
super((Class) null);
- newKProcess(parent,name);
+ newTDEProcess(parent,name);
}
- private native void newKProcess(TQObject parent, String name);
- public KProcess(TQObject parent) {
+ private native void newTDEProcess(TQObject parent, String name);
+ public TDEProcess(TQObject parent) {
super((Class) null);
- newKProcess(parent);
+ newTDEProcess(parent);
}
- private native void newKProcess(TQObject parent);
+ private native void newTDEProcess(TQObject parent);
/**
Constructor
@short Constructor
*/
- public KProcess() {
+ public TDEProcess() {
super((Class) null);
- newKProcess();
+ newTDEProcess();
}
- private native void newKProcess();
+ private native void newTDEProcess();
/**
Sets the executable and the command line argument list for this process.
For example, doing an "ls -l /usr/local/bin" can be achieved by:
<pre>
- KProcess p;
+ TDEProcess p;
...
p << "ls" << "-l" << "/usr/local/bin"
</pre>
@param arg the argument to add
- @return a reference to this KProcess
+ @return a reference to this TDEProcess
@short Sets the executable and the command line argument list for this process.
*/
- public native KProcess op_write(String arg);
+ public native TDEProcess op_write(String arg);
/**
Sets the executable and the command line argument list for this process,
in a single method call, or add a list of arguments.
@param args the arguments to add
- @return a reference to this KProcess
+ @return a reference to this TDEProcess
@short Sets the executable and the command line argument list for this process, in a single method call, or add a list of arguments.
*/
- public native KProcess op_write(String[] args);
+ public native TDEProcess op_write(String[] args);
/**
Clear a command line argument list that has been set by using
operator<<.
@@ -196,7 +196,7 @@ public class KProcess extends TQObject {
Starts the process.
For a detailed description of the
various run modes and communication semantics, have a look at the
- general description of the KProcess class. Note that if you use
+ general description of the TDEProcess class. Note that if you use
setUsePty( Stdout | Stderr, \<boolean\> ), you cannot use Stdout | Stderr
here - instead, use Stdout only to receive the mixed output.
The following problems could cause this function to
@@ -253,9 +253,9 @@ public class KProcess extends TQObject {
/** Returns the process id of the process.
If it is called after
the process has exited, it returns the process id of the last
- child process that was created by this instance of KProcess.
+ child process that was created by this instance of TDEProcess.
Calling it before any child process has been started by this
- KProcess instance causes pid() to return 0.
+ TDEProcess instance causes pid() to return 0.
@return the pid of the process or 0 if no process has been started yet.
@short Returns the process id of the process.
@@ -463,12 +463,12 @@ public class KProcess extends TQObject {
public native void setUseShell(boolean useShell, String shell);
public native void setUseShell(boolean useShell);
/**
- Detaches KProcess from child process. All communication is closed.
+ Detaches TDEProcess from child process. All communication is closed.
No exit notification is emitted any more for the child process.
- Deleting the KProcess will no longer kill the child process.
+ Deleting the TDEProcess will no longer kill the child process.
Note that the current process remains the parent process of the
child process.
- @short Detaches KProcess from child process.
+ @short Detaches TDEProcess from child process.
*/
public native void detach();
/**
@@ -499,7 +499,7 @@ public class KProcess extends TQObject {
/**
This function is called from start() right before a fork() takes
place. According to the <code>comm</code> parameter this function has to initialize
- the in, out and err data members of KProcess.
+ the in, out and err data members of TDEProcess.
This function should return 1 if setting the needed communication channels
was successful.
The default implementation is to create UNIX STREAM sockets for the
@@ -514,7 +514,7 @@ public class KProcess extends TQObject {
out[1] and out[1].
Furthermore, it must also create the TQSocketNotifiers innot,
outnot and errnot and connect their Qt signals to the respective
- KProcess slots.
+ TDEProcess slots.
For a more detailed explanation, it is best to have a look at the default
implementation in kprocess.cpp.
@short Called right after a (successful) fork() on the parent side.
@@ -554,12 +554,12 @@ public class KProcess extends TQObject {
<li>
if pid() returns non-zero and runs is true, the communication
links should be monitored for data until the file handle returned by
- KProcessController.theKProcessController.notifierFd() becomes ready
+ TDEProcessController.theTDEProcessController.notifierFd() becomes ready
for reading - when it triggers, runs should be reset to false, and
the function should be immediately left without closing anything.
</li>
The previous semantics of this function are forward-compatible, but should
- be avoided, as they are prone to race conditions and can cause KProcess
+ be avoided, as they are prone to race conditions and can cause TDEProcess
(and thus the whole program) to lock up under certain circumstances. At the
end the function closes the communication links in any case. Additionally