mirror of
https://github.com/edeproject/ede.git
synced 2023-08-10 21:13:03 +03:00
Recognize return codes and display appropriate dialog. Works only if
executable was not found or file is not executable. Add mutexes since childs return codes comes from second thread. This will also prevent races when report dialogs are shown.
This commit is contained in:
@ -18,6 +18,8 @@
|
||||
#include <edelib/String.h>
|
||||
#include <FL/x.h>
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
struct EvokeClient {
|
||||
edelib::String desc; // short program description (used in Starting... message)
|
||||
edelib::String icon; // icon for this client
|
||||
@ -90,4 +92,20 @@ class EvokeService {
|
||||
|
||||
#define EVOKE_LOG EvokeService::instance()->log()->printf
|
||||
|
||||
/*
|
||||
* FIXME: This should be probably declared somewhere outside
|
||||
* or in edelib as separate class
|
||||
*/
|
||||
class Mutex {
|
||||
private:
|
||||
pthread_mutex_t mutex;
|
||||
Mutex(const Mutex&);
|
||||
Mutex& operator=(const Mutex&);
|
||||
public:
|
||||
Mutex() { pthread_mutex_init(&mutex, 0); }
|
||||
~Mutex() { pthread_mutex_destroy(&mutex); }
|
||||
void lock(void) { pthread_mutex_lock(&mutex); }
|
||||
void unlock(void) { pthread_mutex_unlock(&mutex); }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user