X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Futil%2Ftest_os_priority.c;h=94e2719a2aa05406a0646c9f2ded8088fb24a437;hb=bb83cd2d04ff5a3f7a8d05fc9a724b0246e958b6;hp=ab0aba33de06e077762687aec7d0ff661b0ceea2;hpb=f1d7ff42932e07786b8d761c2eeb141148d03aab;p=oweals%2Fgnunet.git diff --git a/src/util/test_os_priority.c b/src/util/test_os_priority.c index ab0aba33d..94e2719a2 100644 --- a/src/util/test_os_priority.c +++ b/src/util/test_os_priority.c @@ -4,7 +4,7 @@ GNUnet is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 2, or (at your + by the Free Software Foundation; either version 3, or (at your option) any later version. GNUnet is distributed in the hope that it will be useful, but @@ -30,42 +30,30 @@ static int testprio () { - pid_t child; if (GNUNET_OK != - GNUNET_OS_set_process_priority (getpid (), + GNUNET_OS_set_process_priority (GNUNET_OS_process_current (), GNUNET_SCHEDULER_PRIORITY_DEFAULT)) return 1; if (GNUNET_OK != - GNUNET_OS_set_process_priority (getpid (), + GNUNET_OS_set_process_priority (GNUNET_OS_process_current (), GNUNET_SCHEDULER_PRIORITY_UI)) return 1; if (GNUNET_OK != - GNUNET_OS_set_process_priority (getpid (), + GNUNET_OS_set_process_priority (GNUNET_OS_process_current (), GNUNET_SCHEDULER_PRIORITY_IDLE)) return 1; if (GNUNET_OK != - GNUNET_OS_set_process_priority (getpid (), + GNUNET_OS_set_process_priority (GNUNET_OS_process_current (), GNUNET_SCHEDULER_PRIORITY_BACKGROUND)) return 1; if (GNUNET_OK != - GNUNET_OS_set_process_priority (getpid (), + GNUNET_OS_set_process_priority (GNUNET_OS_process_current (), GNUNET_SCHEDULER_PRIORITY_HIGH)) return 1; if (GNUNET_OK != - GNUNET_OS_set_process_priority (getpid (), + GNUNET_OS_set_process_priority (GNUNET_OS_process_current (), GNUNET_SCHEDULER_PRIORITY_HIGH)) return 1; -#ifndef MINGW - child = fork (); - if (child == 0) - { - sleep (10); - exit (0); - } - if (GNUNET_OK != - GNUNET_OS_set_process_priority (child, GNUNET_SCHEDULER_PRIORITY_IDLE)) - return 1; -#endif return 0; }