這幾天在linux伺服器上跑程式。
在perl 檔案中,會相繼呼叫幾個system產生子程序。
-------------example.pl---------
chdir "/home/";
system 'perl ./1.pl';
system 'perl ./2.pl';
system 'perl ./3.pl';
比如用screen跑著example.pl中的1.pl。我現在想1.pl接著跑,但讓1.pl跑完後,不再跑2.pl了。
可以通過kill (pid of example.pl)來實現,但是如果只在screen的父程序tty中kill掉example.pl,那麼會kill掉整個screen,1.pl也就停止了。
所以應該在screen中kill example.pl就不會有問題了。
note:
使用screen啟動程式分三種情況(網上有相應的文章)
1. screen example.pl
2. screen 進入新的視窗後,再輸入命令example.pl
3. 在screen中建多視窗
應該使用第2種方法!來啟動example.pl。
使用第1種會在程式執行完的時候直接退出screen.
乙個關於 include的問題
2001年05月03日 12 04 00 乙個關於 include的問題 趙湘寧 問題 我試圖將乙個標頭檔案包含在工程的資源檔案中。為此在.rc檔案中新增了如下一行 include myfile.h 雖然執行沒有問題,但是每次在visual studio中開啟資源時,它都把這一行 刪除掉了。我之所以...
關於繼承的乙個問題
class a virtual a class b public a virtual b class c public b virtual c int fun int n char last4hex unsigned int num,char a 5 int main int argc,char a...
乙個關於授權的問題
grant all on ibench.to ibench 增加乙個使用者 ibench,該使用者擁有對資料庫 ibench 的所有許可權.等價於以下的寫法 grant all privileges on ibench.to ibench 如果不好用需要如下操作 4.0以前的似乎flush priv...