清单1给出一个非常简单的程序,它的作用仅仅是使用退出码2退出。
Listing 1 shows a very simple program that simply exits with an exit code of 2.
但是,在父进程退出之前,它必须释放共享内存。
Before the parent can exit, however, it must free the Shared memory.
这个方法main分配内存,调用foo,使用分配的内存,然后释放它并退出。
The method main allocates memory, calls foo , USES the allocated memory, and then frees it and exits.
It will probably quit at some point because of space issues, unless I'm writing an algorithm that is using no additional space.
其中一个的时候,它会一直运行下去,它可能在某一处因为空间问题退出,除非我写了一个。
And in fact we know if the price goes to 0, it's delisted from the exchange.
实际上我们知道如果价格是,它就会从交易中退出。
Why 1? It's arbitrary, but it's anything other than zero so I just exit because something went wrong and this program is just going to bail.
为什么是1?这是任意的,但它是非零的,因为出错了,我退出程序,然后这个程序就释放了。
应用推荐