1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

[Mac] There is no /proc filesystem on Mac

Closes #1294

[ci skip]
This commit is contained in:
David Rosca 2014-04-14 21:13:12 +02:00
parent 9df585a8f8
commit c6ae381404
2 changed files with 4 additions and 4 deletions

View File

@ -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++) {

View File

@ -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;