Google

Go to the first, previous, next, last section, table of contents.


ox_reset,ox_intr,register_handler

ox_reset(number)
:: プロセスのリセット
ox_intr(number)
:: プロセスのに SIGINT 送付
register_handler(func)
:: プロセスのリセットのための関数登録
return
1
number
数 (プロセス識別子)
func
関数子または 0
  • ox_reset() は, 識別子 number のプロセスをリセットし, コマン ド受け付け状態にする.
  • そのプロセスが既に書き出した, あるいは現在書き出し中のデータがある場合, それを全部読み出し, 出力バッファを空にした時点で戻る.
  • 子プロセスが RUN 状態の場合でも, 割り込みにより強制的に計算を終了させる.
  • 分散計算を行う函数の先頭で, 使用するプロセスに対して実行する. あるいは 計算途中での強制中断に用いる.
  • ox_intr() は, 識別子 number のプロセスをに対して SIGINT を送付する. SIGINT に対するプロセスの動作は 規定されていないが, `ox_asir' の場合, ただちに debug mode に 入る. X 上で動作している場合, デバッグコマンド入力用のウィンドウが ポップアップする.
  • register_handler() は, C-c などによる割り込みの際に, u を指定することで, 無引数ユーザ定義関数 func() が呼び出される ように設定する. この関数に, ox_reset() を呼び出させることで, 割り込みの際に自動的に OpenXM server のリセットを行うことができる.
  • func に 0 を指定することで, 設定を解除できる.
[10] ox_launch();
0
[11] ox_rpc(0,"fctr",x^100-y^100);
0
[12] ox_reset(0); /* xterm のウィンドウには                             */
1                 /* usr1 : return to toplevel by SIGUSR1 が表示される. */
[340] Procs=[ox_launch(),ox_launch()];
[0,1]
[341] def reset() { extern Procs; map(ox_reset,Procs);}
[342] map(ox_rpc,Procs,"fctr",x^100-y^100);
[0,0]
[343] register_handler(reset);
1
[344] interrupt ?(q/t/c/d/u/w/?) u
Abort this computation? (y or n) y
Calling the registered exception handler...done.
return to toplevel
参照
section ox_rpc, ox_cmo_rpc, ox_execute_string


Go to the first, previous, next, last section, table of contents.