Ignore:
Timestamp:
Jul 24, 2018 4:26:40 PM (2 years ago)
Author:
meeh <meeh@…>
Branches:
master
Children:
7338282b
Parents:
2ee1a21
Message:

Code changes:

  • Port check to see if i2p is already running.
  • All buttons in the menu should work now.
  • Rewrote some C++ to Objective-C, which fits better with the integration.
  • Misc cleanup.
  • Made the launch of router repeatable.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • launchers/macosx/obj-cpp/PidWatcher.h

    r2ee1a21 rf9fbc76  
    44#include <unistd.h>
    55#include <sys/event.h>
    6 #include <functional>
    76
    87#include "neither/either.hpp"
     
    1110using callbackType = void (CFFileDescriptorRef, CFOptionFlags, void *);
    1211using HandleFunction = std::function<void(int)>;
    13 /*
    14 class CallbackWrapper
    15 {
    16     CallbackWrapper(HandleFunction func) : mCallback(func);
    17     void operator(CFFileDescriptorRef fdref, CFOptionFlags callBackTypes, void *info) {
    18         struct kevent kev;
    19         int fd = CFFileDescriptorGetNativeDescriptor(fdref);
    20         kevent(fd, NULL, 0, &kev, 1, NULL);
    21         // take action on death of process here
    22         NSLog(@"process with pid '%u' died\n", (unsigned int)kev.ident);
    23 
    24         mCallback(0);
    25         CFFileDescriptorInvalidate(fdref);
    26         CFRelease(fdref);
    27     }
    28 
    29 private:
    30     HandleFunction mCallback;
    31 };
    32 */
    3312
    3413static void noteProcDeath(CFFileDescriptorRef fdref, CFOptionFlags callBackTypes, void *info) {
Note: See TracChangeset for help on using the changeset viewer.