diff options
author | Fritz Elfert <felfert@to.com> | 2002-03-18 05:01:40 +0000 |
---|---|---|
committer | Fritz Elfert <felfert@to.com> | 2002-03-18 05:01:40 +0000 |
commit | 23f25b04b95f08f5fc3aeaf9ea745326246dec9f (patch) | |
tree | dbd68bb6a5e228efa95dbfb18fa69c563925163c /plpbackup | |
parent | 38fc74f68c90aff4909660b89a9c233eac16f626 (diff) | |
download | plptools-23f25b04b95f08f5fc3aeaf9ea745326246dec9f.tar.gz plptools-23f25b04b95f08f5fc3aeaf9ea745326246dec9f.tar.bz2 plptools-23f25b04b95f08f5fc3aeaf9ea745326246dec9f.zip |
- made kpsion SIBO-aware
- Added SIBO-related stuff in PsiTime
- Added new class PsiProcess, renamed rpcs:queryDrive to queryPrograms
and changed it accordingly
- Adapted kspion, plpbackup, plpnfsd and plpftp to use queryPrograms
- Several cleanups in rfsv16
Diffstat (limited to 'plpbackup')
-rw-r--r-- | plpbackup/plpbackup.cc | 31 |
1 files changed, 6 insertions, 25 deletions
diff --git a/plpbackup/plpbackup.cc b/plpbackup/plpbackup.cc index cbd211c..4c111a7 100644 --- a/plpbackup/plpbackup.cc +++ b/plpbackup/plpbackup.cc @@ -160,43 +160,24 @@ checkAbort() static int stopPrograms() { Enum<rfsv::errs> res; - bufferArray tmp; + processList tmp; if (verbose > 0) cout << _("Stopping programs ...") << endl; - if ((res = Rpcs->queryDrive('C', tmp)) != rfsv::E_PSI_GEN_NONE) { + if ((res = Rpcs->queryPrograms(tmp)) != rfsv::E_PSI_GEN_NONE) { cerr << _("plpbackup: Could not get process list: ") << res << endl; return 1; } else { - while (!tmp.empty()) { - ostrstream pbuf; - bufferStore cmdargs; - bufferStore bs = tmp.pop(); - int pid = bs.getWord(0); - - pbuf << bs.getString(2) << ".$"; - if (S5mx) - pbuf << dec << setw(2) << setfill(0) << pid; - else - pbuf << dec << pid; - pbuf << '\0'; - bs = tmp.pop(); - if (Rpcs->getCmdLine(pbuf.str(), cmdargs) == 0) { - string cmdline = cmdargs.getString(0); - cmdline += " "; - cmdline += bs.getString(0); - savedCommands.push_back(cmdline); - if (verbose > 1) - cout << cmdline << endl; - } - Rpcs->stopProgram(pbuf.str()); + for (processList::iterator i = tmp.begin(); i != tmp.end(); i++) { + savedCommands.push_back(i->getArgs()); + Rpcs->stopProgram(i->getProcId()); } time_t tstart = time(0) + 5; while (true) { usleep(100000); if (checkAbort()) return 1; - if ((res = Rpcs->queryDrive('C', tmp)) != rfsv::E_PSI_GEN_NONE) { + if ((res = Rpcs->queryPrograms(tmp)) != rfsv::E_PSI_GEN_NONE) { cerr << "Could not get process list, Error: " << res << endl; return 1; } |