暗黑2玩 impk的时候进入游戏不久会出现 you are killed by warden because of modified什么的

暗黑2玩 impk的时候进入游戏不久会出现 you are killed by warden because of modified什么的,第1张

老问题了

4、显示"You are killed by Warden because use Modified AnimDataD2!"

答:你使用了修改的AnimDataD2文件,删除之。一般在data\global\AnimDataD2

改waiting函数。修改后全部代码:

#include <stdioh>

#include <unistdh>

#include <signalh>

void waiting();

void stop();

int wait_mark = 0;

int main()

{

int p1 = 0;

int p2 = 0;

while((p1 = fork()) == -1);

if(p1 > 0){

while((p2 = fork()) == -1);

if(p2 > 0){

printf("parent\n");

wait_mark = 1;

signal(SIGINT,stop);

waiting();

kill(p1,16);

kill(p2,17);

wait(0);

wait(0);

printf("parent process is killed!\n");

exit(0);

}

else{

printf("p2\n");

wait_mark = 1;

signal(17,stop);

waiting();

lockf(stdout,1,0);

printf("chile process 2 is killed by parent!\n");

lockf(stdout,0,0);

exit(0);

}

}

else{

printf("p1\n");

wait_mark = 1;

signal(16,stop);

waiting();

lockf(stdout,1,0);

printf("chile process 1 is killed by parent!\n");

lockf(stdout,0,0);

exit(0);

}

return 0;

}

void waiting()

{

while(wait_mark != 0)

{

signal(SIGINT,stop);

sleep(1);

}

}

void stop()

{

wait_mark = 0;

}

控制台执行可执行文件,看到:

new@linux-14y9:~> /home/new/Projects/CTest/lockf-build-desktop/lockf

p1

parent

p2

这时候按下Ctrl+C,现在要Ctrl+C才能触发SIGINT信号了。

按了Ctrl+C后,看到结果:

new@linux-14y9:~> /home/new/Projects/CTest/lockf-build-desktop/lockf

p1

parent

p2

^Cchile process 1 is killed by parent!

chile process 2 is killed by parent!

parent process is killed!

清华不少书都是坑爹,计算机还是学外文翻译来的教材好。

以上就是关于暗黑2玩 impk的时候进入游戏不久会出现 you are killed by warden because of modified什么的全部的内容,包括:暗黑2玩 impk的时候进入游戏不久会出现 you are killed by warden because of modified什么的、Linux *** 作系统一个C程序错误、等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zz/9864250.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-02
下一篇 2023-05-02

发表评论

登录后才能评论

评论列表(0条)

保存