lftp  4.5.4
About: lftp is a command line ftp client (FTP, HTTP, ssl support, background transfer, reget, reput, ...).
  Fossies Dox: lftp-4.5.4.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
SysCmdJob.h
Go to the documentation of this file.
1 /*
2  * lftp - file transfer program
3  *
4  * Copyright (c) 1996-2012 by Alexander V. Lukyanov (lav@yars.free.net)
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef SYSCMDJOB_H
21 #define SYSCMDJOB_H
22 
23 #include "trio.h"
24 #include "Job.h"
25 #include "ProcWait.h"
26 
27 class SysCmdJob : public Job
28 {
29  xstring cmd;
31  void PrepareToDie();
32 public:
33  SysCmdJob(const char *new_cmd);
34  ~SysCmdJob();
35  int Do();
36  int Done() { return(w && w->GetState()!=w->RUNNING); }
37  int AcceptSig(int);
38  int ExitCode() { return w?w->GetInfo()>>8:1; }
39 };
40 
41 #endif//SYSCMDJOB_H
Definition: Job.h:34
SysCmdJob(const char *new_cmd)
Definition: SysCmdJob.cc:33
State GetState()
Definition: ProcWait.h:54
int ExitCode()
Definition: SysCmdJob.h:38
int GetInfo()
Definition: ProcWait.h:55
int Do()
Definition: SysCmdJob.cc:48
int AcceptSig(int)
Definition: SysCmdJob.cc:91
~SysCmdJob()
Definition: SysCmdJob.cc:46
int Done()
Definition: SysCmdJob.h:36