summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/oprocess.h
Unidiff
Diffstat (limited to 'libopie2/opiecore/oprocess.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/oprocess.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/libopie2/opiecore/oprocess.h b/libopie2/opiecore/oprocess.h
index 1a2472d..eb56b03 100644
--- a/libopie2/opiecore/oprocess.h
+++ b/libopie2/opiecore/oprocess.h
@@ -34,25 +34,31 @@ _;:,     .>    :=|. This program is free software; you can
34/* QT */ 34/* QT */
35#include <qcstring.h> 35#include <qcstring.h>
36#include <qobject.h> 36#include <qobject.h>
37#include <qvaluelist.h> 37#include <qvaluelist.h>
38 38
39/* STD */ 39/* STD */
40#include <sys/types.h> // for pid_t 40#include <sys/types.h> // for pid_t
41#include <sys/wait.h> 41#include <sys/wait.h>
42#include <signal.h> 42#include <signal.h>
43#include <unistd.h> 43#include <unistd.h>
44 44
45class QSocketNotifier; 45class QSocketNotifier;
46
47namespace Opie {
48namespace Core {
49namespace Private {
50class OProcessController;
46class OProcessPrivate; 51class OProcessPrivate;
52}
47 53
48/** 54/**
49 * Child process invocation, monitoring and control. 55 * Child process invocation, monitoring and control.
50 * 56 *
51 * @sect General usage and features 57 * @sect General usage and features
52 * 58 *
53 *This class allows a KDE and OPIE application to start child processes without having 59 *This class allows a KDE and OPIE application to start child processes without having
54 *to worry about UN*X signal handling issues and zombie process reaping. 60 *to worry about UN*X signal handling issues and zombie process reaping.
55 * 61 *
56 *@see KProcIO 62 *@see KProcIO
57 * 63 *
58 *Basically, this class distinguishes three different ways of running 64 *Basically, this class distinguishes three different ways of running
@@ -388,24 +394,25 @@ public:
388 394
389 /** 395 /**
390 * This causes the stderr file descriptor of the child process to be 396 * This causes the stderr file descriptor of the child process to be
391 * closed. 397 * closed.
392 * 398 *
393 * @return @p false if no communication to the process's stderr 399 * @return @p false if no communication to the process's stderr
394 * had been specified in the call to @ref start(). 400 * had been specified in the call to @ref start().
395 */ 401 */
396 bool closeStderr(); 402 bool closeStderr();
397 403
398 /** 404 /**
399 * Lets you see what your arguments are for debugging. 405 * Lets you see what your arguments are for debugging.
406 * \todo make const
400 */ 407 */
401 408
402 const QValueList<QCString> &args() 409 const QValueList<QCString> &args()
403 { 410 {
404 return arguments; 411 return arguments;
405 } 412 }
406 413
407 /** 414 /**
408 * Controls whether the started process should drop any 415 * Controls whether the started process should drop any
409 * setuid/segid privileges or whether it should keep them 416 * setuid/segid privileges or whether it should keep them
410 * 417 *
411 * The default is @p false : drop privileges 418 * The default is @p false : drop privileges
@@ -707,25 +714,25 @@ protected:
707 int childError( int fdno ); 714 int childError( int fdno );
708 715
709 // information about the data that has to be sent to the child: 716 // information about the data that has to be sent to the child:
710 717
711 const char *input_data; // the buffer holding the data 718 const char *input_data; // the buffer holding the data
712 int input_sent; // # of bytes already transmitted 719 int input_sent; // # of bytes already transmitted
713 int input_total; // total length of input_data 720 int input_total; // total length of input_data
714 721
715 /** 722 /**
716 * @ref OProcessController is a friend of OProcess because it has to have 723 * @ref OProcessController is a friend of OProcess because it has to have
717 * access to various data members. 724 * access to various data members.
718 */ 725 */
719 friend class OProcessController; 726 friend class Private::OProcessController;
720 727
721private: 728private:
722 /** 729 /**
723 * Searches for a valid shell. 730 * Searches for a valid shell.
724 * Here is the algorithm used for finding an executable shell: 731 * Here is the algorithm used for finding an executable shell:
725 * 732 *
726 * @li Try the executable pointed to by the "SHELL" environment 733 * @li Try the executable pointed to by the "SHELL" environment
727 * variable with white spaces stripped off 734 * variable with white spaces stripped off
728 * 735 *
729 * @li If your process runs with uid != euid or gid != egid, a shell 736 * @li If your process runs with uid != euid or gid != egid, a shell
730 * not listed in /etc/shells will not used. 737 * not listed in /etc/shells will not used.
731 * 738 *
@@ -736,17 +743,19 @@ private:
736 /** 743 /**
737 * Used by @ref searchShell in order to find out whether the shell found 744 * Used by @ref searchShell in order to find out whether the shell found
738 * is actually executable at all. 745 * is actually executable at all.
739 */ 746 */
740 bool isExecutable( const QCString &filename ); 747 bool isExecutable( const QCString &filename );
741 748
742 // Disallow assignment and copy-construction 749 // Disallow assignment and copy-construction
743 OProcess( const OProcess& ); 750 OProcess( const OProcess& );
744 OProcess& operator= ( const OProcess& ); 751 OProcess& operator= ( const OProcess& );
745 752
746private: 753private:
747 void init ( ); 754 void init ( );
748 OProcessPrivate *d; 755 Private::OProcessPrivate *d;
749}; 756};
757}
758}
750 759
751#endif 760#endif
752 761