简体   繁体   English

中断c代码,md5文件

[英]interrupt c code, md5 file

How can I interrupt a running C code, to create a hash of a file in a directory? 如何中断正在运行的C代码,以在目录中创建文件的哈希?

So at some point in the C code, I put in some code which will create an md5 hash of a file, such as thisfile.txt? 因此,在C代码的某个时刻,我放入了一些代码,这些代码将创建文件的md5哈希,例如thisfile.txt?

The two parts of your question seem un-related. 您的问题的两个部分似乎无关。
If you want to interrupt a running C code, you should use signals. 如果要中断正在运行的C代码,则应使用信号。 Refer http://beej.us/guide/bgipc/output/html/multipage/signals.html 请参阅http://beej.us/guide/bgipc/output/html/multipage/signals.html
If you want to create md5, use MD5 APIs which are readily available. 如果要创建md5,请使用现成的MD5 API。
I don't understand the need to generate an interrupt to calculate the hash. 我不明白需要生成一个中断来计算哈希值。 Thanks 谢谢

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM