X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Ftincd.c;h=d1dcf848444ea9077cee66058ab5158d7a6af0a2;hb=67766d65f06854ee894d784f638c5c9cd2b50bca;hp=3dab9a01157b5751c14a65f24fc3d82ae94ea94f;hpb=aca70cd3c3fe787e62c618849e43f67b3870ac20;p=meshlink diff --git a/src/tincd.c b/src/tincd.c index 3dab9a01..d1dcf848 100644 --- a/src/tincd.c +++ b/src/tincd.c @@ -1,7 +1,7 @@ /* tincd.c -- the main file for tincd Copyright (C) 1998-2005 Ivo Timmermans - 2000-2010 Guus Sliepen + 2000-2011 Guus Sliepen 2008 Max Rijevski 2009 Michael Tokarev 2010 Julien Muchembled @@ -203,6 +203,8 @@ static bool parse_options(int argc, char **argv) { kill_tincd = SIGINT; else if(!strcasecmp(optarg, "ALRM")) kill_tincd = SIGALRM; + else if(!strcasecmp(optarg, "ABRT")) + kill_tincd = SIGABRT; else { kill_tincd = atoi(optarg); @@ -502,12 +504,12 @@ static bool drop_privs() { } #ifdef HAVE_MINGW -# define setpriority(level) SetPriorityClass(GetCurrentProcess(), level) +# define setpriority(level) SetPriorityClass(GetCurrentProcess(), (level)) #else # define NORMAL_PRIORITY_CLASS 0 # define BELOW_NORMAL_PRIORITY_CLASS 10 # define HIGH_PRIORITY_CLASS -10 -# define setpriority(level) nice(level) +# define setpriority(level) (setpriority(PRIO_PROCESS, 0, (level))) #endif int main(int argc, char **argv) {