• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KIO

  • sources
  • kde-4.12
  • kdelibs
  • kio
  • kfile
kfsprocess.h
Go to the documentation of this file.
1 /* This file is part of the KDE libraries
2  Copyright (C) 1997 Christian Czezakte (e9025461@student.tuwien.ac.at)
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License as published by the Free Software Foundation; either
7  version 2 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 
20 #ifndef KFSPROC_H
21 #define KFSPROC_H
22 
23 #include <QtCore/QList>
24 #include <QtCore/QObject>
25 
26 #include <sys/types.h> // for pid_t
27 
28 class QSocketNotifier;
29 class KfsProcess;
30 
32 class KfsProcessController : public QObject
33 {
34  Q_OBJECT
35  friend class KfsProcess;
36 
37 public:
38  static void theSigCHLDHandler(int signal);
39 
40 private:
41  KfsProcessController();
42  ~KfsProcessController();
43  static void setupHandlers();
44  static void resetHandlers();
45  static void ref();
46  static void deref();
47  static KfsProcessController *instance();
48  void addKProcess( KfsProcess* );
49  void removeKProcess( KfsProcess* );
50  void addProcess(int pid);
51 
52  int m_fd[2];
53  QSocketNotifier *m_notifier;
54  QList<KfsProcess*> m_kProcessList;
55  QList<int> m_unixProcessList;
56  static struct sigaction s_oldChildHandlerData;
57  static bool s_handlerSet;
58  static int s_refCount;
59  static KfsProcessController* s_instance;
60 
61 private Q_SLOTS:
62  void slotDoHousekeeping();
63 };
64 
66 class KfsProcess : public QObject
67 {
68  Q_OBJECT
69  friend class KfsProcessController;
70 
71 public:
72 
73  explicit KfsProcess( QObject* parent=0L );
74  ~KfsProcess();
75 
76  KfsProcess &operator<<(const QString& arg);
77  KfsProcess &operator<<(const char * arg);
78  bool start();
79  void detach();
80 
81 Q_SIGNALS:
82  void processExited();
83 
84 private:
85  QList<QByteArray> arguments;
86 
87  bool runs;
88  pid_t pid_;
89  void processHasExited();
90 };
91 
92 #endif
93 
KfsProcess::~KfsProcess
~KfsProcess()
Definition: kfsprocess.cpp:235
KfsProcess::KfsProcessController
friend class KfsProcessController
Definition: kfsprocess.h:69
KfsProcessController
Definition: kfsprocess.h:32
QString
QObject
KfsProcess::processExited
void processExited()
KfsProcess
Definition: kfsprocess.h:66
KfsProcess::start
bool start()
Definition: kfsprocess.cpp:262
KfsProcess::operator<<
KfsProcess & operator<<(const QString &arg)
Definition: kfsprocess.cpp:256
KfsProcess::KfsProcess
KfsProcess(QObject *parent=0L)
Definition: kfsprocess.cpp:226
KfsProcessController::theSigCHLDHandler
static void theSigCHLDHandler(int signal)
Definition: kfsprocess.cpp:157
KfsProcess::detach
void detach()
Definition: kfsprocess.cpp:241
QList< KfsProcess * >
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KIO

Skip menu "KIO"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal