Source Code (Use browser search to find items of interest.)

Class Index

kmail'ExtEditLaunch (./kdenetwork/kmail/kmsettings.cpp:980)

class ExtEditLaunch {
private:
   QString cmdline;

public:
  ExtEditLaunch(QString cmd) { cmdline=cmd; }
  ~ExtEditLaunch()          {}
  void run();
  inline void setFile(QString cmd) {cmdline = cmd;}
private:
  void doIt();
};

void ExtEditLaunch::doIt() {
   signal(SIGCHLD, SIG_IGN); // This isn't used anywhere else so
                             // it should be safe to do this here.
                             // I dont' see how we can cleanly wait
                             // on all possible childs in this app so
                             // I use this hack instead.  Another
                             // alternative is to fork() twice, recursively,
                             // but that is slower.
   system((const char *)cmdline);
}

void ExtEditLaunch::run() {
  signal(SIGCHLD, SIG_IGN);  // see comment above.

  if (!fork()) {
     doIt();
     exit(0);
  }
}

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------


//-----------------------------------------------------------------------------

kmail'ExtEditLaunch::run() (./kdenetwork/kmail/kmsettings.cpp:1004)

void ExtEditLaunch::run() {
  signal(SIGCHLD, SIG_IGN);  // see comment above.

  if (!fork()) {
     doIt();
     exit(0);
  }
}

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------


//-----------------------------------------------------------------------------