~ubuntu-branches/ubuntu/oneiric/procserv/oneiric

« back to all changes in this revision

Viewing changes to processClass.h

  • Committer: Bazaar Package Importer
  • Author(s): Ralph Lange
  • Date: 2010-01-04 16:19:35 UTC
  • Revision ID: james.westby@ubuntu.com-20100104161935-uaosvjyry3zc5l5l
Tags: upstream-2.5.0
ImportĀ upstreamĀ versionĀ 2.5.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Process server for soft ioc
 
2
// David H. Thompson 8/29/2003
 
3
// Ralph Lange 04/25/2008
 
4
// GNU Public License (GPLv3) applies - see www.gnu.org
 
5
 
 
6
 
 
7
#ifndef processClassH
 
8
#define processClassH
 
9
 
 
10
#include "procServ.h"
 
11
 
 
12
class processClass : public connectionItem
 
13
{
 
14
friend connectionItem * processFactory(int argc, char *argv[]);
 
15
friend bool processFactoryNeedsRestart();
 
16
friend void processFactorySendSignal(int signal);
 
17
public:
 
18
    processClass(int argc,char * argv[]);
 
19
    bool OnPoll();
 
20
    int Send( const char *,int);
 
21
    void OnWait(int pid);
 
22
    char factoryName[100];
 
23
    void SetupTio(struct termios *);
 
24
    virtual bool isProcess() const { return true; }
 
25
    static void restartOnce ();
 
26
    static bool exists() { return _runningItem ? true : false; }
 
27
    virtual ~processClass();
 
28
protected:
 
29
    pid_t _pid;
 
30
    static processClass * _runningItem;
 
31
    static time_t _restartTime;
 
32
};
 
33
 
 
34
 
 
35
#endif /* #ifndef processClassH */