mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
parent
9df585a8f8
commit
c6ae381404
6
src/lib/3rdparty/processinfo.cpp
vendored
6
src/lib/3rdparty/processinfo.cpp
vendored
@ -17,7 +17,7 @@
|
||||
* ============================================================ */
|
||||
#include "processinfo.h"
|
||||
|
||||
#ifdef Q_OS_UNIX
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
|
||||
#include <dirent.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
@ -36,7 +36,7 @@ ProcessInfo::ProcessInfo(const QString &name)
|
||||
|
||||
bool ProcessInfo::isRunning() const
|
||||
{
|
||||
#ifdef Q_OS_UNIX
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
|
||||
pid_t pid = GetPIDbyName(qPrintable(m_name));
|
||||
// -1 = process not found
|
||||
// -2 = /proc fs access error
|
||||
@ -46,7 +46,7 @@ bool ProcessInfo::isRunning() const
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef Q_OS_UNIX
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
|
||||
bool ProcessInfo::IsNumeric(const char* ccharptr_CharacterList) const
|
||||
{
|
||||
for (; *ccharptr_CharacterList; ccharptr_CharacterList++) {
|
||||
|
2
src/lib/3rdparty/processinfo.h
vendored
2
src/lib/3rdparty/processinfo.h
vendored
@ -39,7 +39,7 @@ public:
|
||||
bool isRunning() const;
|
||||
|
||||
private:
|
||||
#ifdef Q_OS_UNIX
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
|
||||
bool IsNumeric(const char* ccharptr_CharacterList) const;
|
||||
|
||||
pid_t GetPIDbyName(const char* cchrptr_ProcessName) const;
|
||||
|
Loading…
Reference in New Issue
Block a user