osu-crypto / libPSI

A repository for private set intersection.
Other
168 stars 47 forks source link

How to let the computer know whether the "./frontend" command is successfully executed? Is there a way for the computer to get a return code so that it can recognize that the protocol execution failed? #60

Closed Ant1proton closed 1 year ago

Ant1proton commented 1 year ago

Hello author! I want the computer to automatically execute the [KKRT] protocol, but when executing the [KKRT] protocol, the program may terminate unexpectedly due to various reasons, resulting in the failure to get the final intersection. So I tried to use "$?" to judge whether the command was executed successfully. Later, it was found that as long as the command is executed in the terminal, no matter whether the intersection is obtained at the end, "0" will be returned. How does the computer know whether the "./frontend" command is successfully executed and the intersection is obtained? Is there a way for the computer to get a return code so that it can recognize that the protocol execution failed?

ladnir commented 1 year ago

You can modify the code to output a 1 if an exception is thrown

Ant1proton commented 1 year ago

如果抛出异常,您可以修改代码以输出 1 Thank you very much for your reply!