Revision add73b22 chunker_player/chunker_player.h

View differences:

chunker_player/chunker_player.h
32 32
int queue_filling_threshold;
33 33
int quit;
34 34
short int QueueFillingMode;
35
int P2PProcessID;
35

  
36
void* P2PProcessHandle;
36 37

  
37 38
#ifdef __WIN32__
38
#define KILL_PROCESS(pid) {char command_name[255]; sprintf(command_name, "taskkill /pid %d /F", pid); system(command_name);}
39
//~ #define KILL_PROCESS(pid) {char command_name[255]; sprintf(command_name, "taskkill /pid %d /F", pid); system(command_name);}
40
#define KILL_PROCESS(handle) {TerminateProcess(((PROCESS_INFORMATION*)handle)->hProcess, 0);}
39 41
#define KILLALL(pname) {char command_name[255]; sprintf(command_name, "taskkill /im %s /F", pname); system(command_name);}
40 42
#endif
41 43
#ifdef __LINUX__
42
#define KILL_PROCESS(pid) {char command_name[255]; sprintf(command_name, "kill %d", pid); system(command_name);}
44
#define KILL_PROCESS(handle) {if(*((pid_t*)handle)>0){char command_name[255]; sprintf(command_name, "kill %d", *((pid_t*)handle)); system(command_name);}}
43 45
#define KILLALL(pname) {char command_name[255]; sprintf(command_name, "killall %s -9", pname); system(command_name);}
44 46
#endif
45 47
#ifdef __MACOS__
46
#define KILL_PROCESS(pid) {char command_name[255]; sprintf(command_name, "kill %d", pid); system(command_name);}
48
#define KILL_PROCESS(handle) {if(*((pid_t*)handle)>0){char command_name[255]; sprintf(command_name, "kill %d", *((pid_t*)handle)); system(command_name);}}
47 49
#define KILLALL(pname) {char command_name[255]; sprintf(command_name, "killall %s -9", pname); system(command_name);}
48 50
#endif
49 51

  
50

  
51

  
52

  
53 52
SChannel Channels[MAX_CHANNELS_NUM];
54 53
int NChannels;
55 54
int SelectedChannel;

Also available in: Unified diff