This can be achieved by setting a global flag in the handler code and checking for the flag after completion of the critical part.
这可以通过在信号处理程序代码中设置一个全局标志并在完成关键部分的代码之后检查这个标志来实现。
Since this code is attempting to set up a client connection, the flag is set to 0.
由于这段代码试图建立客户机连接,因此这个标记就应该设置为0。
One way would be to create an array of booleans, one for each line of the original method, and add code that sets the appropriate flag as each line is executed.
可以使用的一种方法是创建一个布尔值数组,初始方法中的每一行代码对应一个布尔值,然后添加代码,每执行一行代码就设置相应的标志。
So that is a flag that tells the compiler that I want to use or link into my own program code that someone else wrote that lives somewhere else on the system whose moniker is CS50.
所以那是一个标记,用来告诉编译器我想使用,或连接我自己的程序代码到一个叫做CS50的系统中的程序,可能其他人在那个系统写了这些程序。
应用推荐