⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 idle.c

📁 unix密码破解软件John the Ripper
💻 C
字号:
/* * This file is part of John the Ripper password cracker, * Copyright (c) 1996-98 by Solar Designer */#include <unistd.h>#ifdef __linux__#include <sched.h>#ifndef SCHED_IDLE#define SCHED_IDLE			3#endifstatic int use_yield = 0;#endif#ifdef __CYGWIN32__extern int nice(int);#endif#include "params.h"#include "config.h"#include "options.h"void idle_init(){#ifdef __linux__	struct sched_param param = {0};#endif	if (!cfg_get_bool(SECTION_OPTIONS, NULL, "Idle")) return;	if (options.flags & FLG_STDOUT) return;	nice(20);#ifdef __linux__	use_yield = sched_setscheduler(getpid(), SCHED_IDLE, &param) ? 1 : 2;#endif}void idle_yield(int always){#ifdef __linux__	if (use_yield)	if (use_yield == 1 || always) sched_yield();#endif}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -