#include <QDir>
#include <QFile>
#include <QFileInfo>
#include <QTextStream>
#include <QApplication>
#include "string.h"
#include "process.h"
Go to the source code of this file.
Functions | |
qint64 | get_pid () |
bool | is_process_running (qint64 pid) |
bool | write_pidfile (QString pidFileName, QString *errmsg) |
qint64 | read_pidfile (QString pidFileName, QString *errmsg) |
Definition in file process.cpp.
qint64 get_pid | ( | ) |
Returns the PID of the current process.
Definition at line 40 of file process.cpp.
Referenced by main(), and write_pidfile().
bool is_process_running | ( | qint64 | pid | ) |
Returns true if a process with the given PID is running.
Definition at line 51 of file process.cpp.
Referenced by is_vidalia_running().
qint64 read_pidfile | ( | QString | pidFileName, | |
QString * | errmsg | |||
) |
Reads the given pidfile and returns the value contained in it. If the file does not exist 0 is returned. Returns -1 if an error occurs.
Definition at line 96 of file process.cpp.
Referenced by is_vidalia_running().
bool write_pidfile | ( | QString | pidFileName, | |
QString * | errmsg | |||
) |
Writes the given file to disk containing the current process's PID.
Definition at line 73 of file process.cpp.
Referenced by main().