增加中国IP缓存
This commit is contained in:
4
common.c
4
common.c
@@ -189,7 +189,7 @@ int _nice(int increment) {
|
||||
}
|
||||
|
||||
// 判断命令是否存在
|
||||
int command_exists(const char *command) {
|
||||
int _command_exists(const char *command) {
|
||||
const char *path_env = getenv("PATH");
|
||||
if (!path_env) {
|
||||
return 0; // 如果 PATH 不存在,返回不存在
|
||||
@@ -221,7 +221,7 @@ int command_exists(const char *command) {
|
||||
return 0; // 命令不存在
|
||||
}
|
||||
|
||||
// 定义一个函数,执行命令并返回输出
|
||||
// 执行命令并返回输出
|
||||
char *_execute_command(const char *command) {
|
||||
FILE *fp;
|
||||
char buffer[1024];
|
||||
|
||||
Reference in New Issue
Block a user