我在C/C++中使用fork()創建子進程。 當父進程結束(或由於某種原因而被終止)時,我希望所有子進程都被終止。 這是由系統自動完成的嗎?或者我必須自己做? 謝謝。 預先存在類似的問題: How can I cause a child process to exit when the parent does? How to make child process die after parent
<?php
class foo
{
//this class is always etended, and has some other methods that do utility work
//and are never overrided
public function init()
{
//what do to here to ca