2010-08-27 39 views
2

我的perl代碼已經看到REAPER已經用作SIGCHLD信號的信號處理程序。給我一些關於REAPER的信息

$SIG{CHLD} = \&REAPER; 

函數也沒有在代碼中定義。任何人都可以深入解釋「REAPER」上的內部操作。

在此先感謝。

+0

你能提供一個引用REAPER的代碼的鏈接嗎? – Ether 2010-08-27 16:40:40

回答

2
  • 閱讀:PerlIPC -Perl進程間通信(信號, 的FIFO,管道,安全子流程, 插座,和信號燈)。

  • 閱讀「收割植物大戰殭屍」從第16.01在 「Perl編程第三版」 拉里 牆

+3

這只是顯示如何編寫自己的'REAPER',但OP抱怨它沒有寫在他的代碼中。 – 2010-08-27 07:55:13

+0

@Karthi:這兩個鏈接將幫助你理解它是如何工作的。它可能被用於殭屍,但在這種情況下,REAPER函數應該在那裏。 – 2010-08-27 08:18:46

+1

@Philip Potter:如果沒有寫入,代碼將不起作用。 – Grrrr 2010-08-27 08:48:33

2
 
    All Our perls have run 
    Here but now they're hung 
    Children don't fear the reaper 
    Nor Do the wind, the sun or the rain 
    We can be like they are 

    Come on process, Don't fear the Reaper 
    Baby take My file, Don't fear the Reaper 
    We'll be able to crash, Don't fear the Reaper 
    Baby it's your code 

REAPER僅僅是代碼的佔位符的名字,你必須寫下自己。有關更多詳細信息,請參閱perlipc

+1

你的詩不編譯。 :-( – mob 2010-08-27 13:51:58

+0

在它之前加上'sub UNIVERSAL :: AUTOLOAD {}':-) – 2010-08-27 14:23:41

+0

需要更多的牛鈴。 – 2010-09-02 21:02:07

相關問題