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
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?
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?