-rw-r--r-- | libopie/oprocess.h | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/libopie/oprocess.h b/libopie/oprocess.h index bf5fe0e..f2853b0 100644 --- a/libopie/oprocess.h +++ b/libopie/oprocess.h | |||
@@ -43,13 +43,13 @@ class OProcessPrivate; | |||
43 | 43 | ||
44 | /** | 44 | /** |
45 | * Child process invocation, monitoring and control. | 45 | * Child process invocation, monitoring and control. |
46 | * | 46 | * |
47 | * @sect General usage and features | 47 | * @sect General usage and features |
48 | * | 48 | * |
49 | *This class allows a KDE application to start child processes without having | 49 | *This class allows a KDE and OPIE application to start child processes without having |
50 | *to worry about UN*X signal handling issues and zombie process reaping. | 50 | *to worry about UN*X signal handling issues and zombie process reaping. |
51 | * | 51 | * |
52 | *@see KProcIO | 52 | *@see KProcIO |
53 | * | 53 | * |
54 | *Basically, this class distinguishes three different ways of running | 54 | *Basically, this class distinguishes three different ways of running |
55 | *child processes: | 55 | *child processes: |
@@ -185,13 +185,19 @@ public: | |||
185 | Block }; | 185 | Block }; |
186 | 186 | ||
187 | /** | 187 | /** |
188 | * Constructor | 188 | * Constructor |
189 | */ | 189 | */ |
190 | OProcess(QObject *parent = 0, const char *name = 0); | 190 | OProcess(QObject *parent = 0, const char *name = 0); |
191 | /** | ||
192 | * Constructor | ||
193 | */ | ||
191 | OProcess(const QString &arg0, QObject *parent = 0, const char *name = 0); | 194 | OProcess(const QString &arg0, QObject *parent = 0, const char *name = 0); |
195 | /** | ||
196 | * Constructor | ||
197 | */ | ||
192 | OProcess(const QStringList &args, QObject *parent = 0, const char *name = 0); | 198 | OProcess(const QStringList &args, QObject *parent = 0, const char *name = 0); |
193 | 199 | ||
194 | /** | 200 | /** |
195 | *Destructor: | 201 | *Destructor: |
196 | * | 202 | * |
197 | * If the process is running when the destructor for this class | 203 | * If the process is running when the destructor for this class |
@@ -407,21 +413,21 @@ public: | |||
407 | 413 | ||
408 | /** | 414 | /** |
409 | * Returns whether the started process will drop any | 415 | * Returns whether the started process will drop any |
410 | * setuid/segid privileges or whether it will keep them | 416 | * setuid/segid privileges or whether it will keep them |
411 | */ | 417 | */ |
412 | bool runPrivileged() const; | 418 | bool runPrivileged() const; |
413 | 419 | ||
414 | /** | 420 | /** |
415 | * Modifies the environment of the process to be started. | 421 | * Modifies the environment of the process to be started. |
416 | * This function must be called before starting the process. | 422 | * This function must be called before starting the process. |
417 | */ | 423 | */ |
418 | void setEnvironment(const QString &name, const QString &value); | 424 | void setEnvironment(const QString &name, const QString &value); |
419 | 425 | ||
420 | /** | 426 | /** |
421 | * Changes the current working directory (CWD) of the process | 427 | * Changes the current working directory (CWD) of the process |
422 | * to be started. | 428 | * to be started. |
423 | * This function must be called before starting the process. | 429 | * This function must be called before starting the process. |
424 | */ | 430 | */ |
425 | void setWorkingDirectory(const QString &dir); | 431 | void setWorkingDirectory(const QString &dir); |
426 | 432 | ||
427 | /** | 433 | /** |
@@ -449,13 +455,13 @@ public: | |||
449 | * Detaches OProcess from child process. All communication is closed. | 455 | * Detaches OProcess from child process. All communication is closed. |
450 | * No exit notification is emitted any more for the child process. | 456 | * No exit notification is emitted any more for the child process. |
451 | * Deleting the OProcess will no longer kill the child process. | 457 | * Deleting the OProcess will no longer kill the child process. |
452 | * Note that the current process remains the parent process of the | 458 | * Note that the current process remains the parent process of the |
453 | * child process. | 459 | * child process. |
454 | */ | 460 | */ |
455 | void detach(); | 461 | void detach(); |
456 | 462 | ||
457 | 463 | ||
458 | 464 | ||
459 | signals: | 465 | signals: |
460 | 466 | ||
461 | /** | 467 | /** |
@@ -483,21 +489,21 @@ signals: | |||
483 | void receivedStdout(OProcess *proc, char *buffer, int buflen); | 489 | void receivedStdout(OProcess *proc, char *buffer, int buflen); |
484 | 490 | ||
485 | /** | 491 | /** |
486 | * Emitted when output from the child process has | 492 | * Emitted when output from the child process has |
487 | * been received on stdout. | 493 | * been received on stdout. |
488 | * | 494 | * |
489 | * To actually get these signals, the respective communications link | 495 | * To actually get these signals, the respective communications link |
490 | * (stdout/stderr) has to be turned on in @ref start() and the | 496 | * (stdout/stderr) has to be turned on in @ref start() and the |
491 | * @p NoRead flag should have been passed. | 497 | * @p NoRead flag should have been passed. |
492 | * | 498 | * |
493 | * You will need to explicitly call resume() after your call to start() | 499 | * You will need to explicitly call resume() after your call to start() |
494 | * to begin processing data from the child process's stdout. This is | 500 | * to begin processing data from the child process's stdout. This is |
495 | * to ensure that this signal is not emitted when no one is connected | 501 | * to ensure that this signal is not emitted when no one is connected |
496 | * to it, otherwise this signal will not be emitted. | 502 | * to it, otherwise this signal will not be emitted. |
497 | * | 503 | * |
498 | * The data still has to be read from file descriptor @p fd. | 504 | * The data still has to be read from file descriptor @p fd. |
499 | **/ | 505 | **/ |
500 | void receivedStdout(int fd, int &len); | 506 | void receivedStdout(int fd, int &len); |
501 | 507 | ||
502 | 508 | ||
503 | /** | 509 | /** |
@@ -547,13 +553,13 @@ protected slots: | |||
547 | */ | 553 | */ |
548 | void slotSendData(int dummy); | 554 | void slotSendData(int dummy); |
549 | 555 | ||
550 | protected: | 556 | protected: |
551 | 557 | ||
552 | /** | 558 | /** |
553 | * Sets up the environment according to the data passed via | 559 | * Sets up the environment according to the data passed via |
554 | * setEnvironment(...) | 560 | * setEnvironment(...) |
555 | */ | 561 | */ |
556 | void setupEnvironment(); | 562 | void setupEnvironment(); |
557 | 563 | ||
558 | /** | 564 | /** |
559 | * The list of the process' command line arguments. The first entry | 565 | * The list of the process' command line arguments. The first entry |
@@ -709,13 +715,13 @@ protected: | |||
709 | */ | 715 | */ |
710 | friend class OProcessController; | 716 | friend class OProcessController; |
711 | 717 | ||
712 | 718 | ||
713 | private: | 719 | private: |
714 | /** | 720 | /** |
715 | * Searches for a valid shell. | 721 | * Searches for a valid shell. |
716 | * Here is the algorithm used for finding an executable shell: | 722 | * Here is the algorithm used for finding an executable shell: |
717 | * | 723 | * |
718 | * @li Try the executable pointed to by the "SHELL" environment | 724 | * @li Try the executable pointed to by the "SHELL" environment |
719 | * variable with white spaces stripped off | 725 | * variable with white spaces stripped off |
720 | * | 726 | * |
721 | * @li If your process runs with uid != euid or gid != egid, a shell | 727 | * @li If your process runs with uid != euid or gid != egid, a shell |