[PR]看護師の好条件な求人情報満載:年間30,000人の転職看護師が利用中

Limbo Tips

Limbo Tips

サメ・ラ・・サ・ケ、ツヤ、ト


UNIX、ヌ、マwaitpid()、舖igaction()、ハ、ノ、チネ、゚ケ遉、サ、ニツヤ、テ、ニ、、、゙、キ、ソ、ャ。「 Inferno/Limbo、ヌ、マ。「・チ・罕ヘ・、ャ・ヨ・・テ・ッ、ケ、、ウ、ネ、ヘヘム、キ、ニ・ケ・゙。シ・ネ、ヒ サメ・ラ・・サ・ケ、ツヤ、ト、ウ、ネ、ャ、ヌ、ュ、゙、ケ。」

implement  Pid;

include "sys.m";
	sys:	Sys;

include "draw.m";

Pid: module {
	init:	fn (ctxt: ref Draw->Context, argv: list of string);
};

init (nil: ref Draw->Context, argv: list of string)
{
	sys = load Sys Sys->PATH;

	sys->print("Pid test program started...\n");

	pidc := chan of int;

	spawn child(pidc);

	pid := sys->pctl(0, nil);
	sys->print("Parent:	My pid is [%d]\n", pid);

	chpid := <- pidc;
	sys->print("Parent:	Child pid is [%d]\n", chpid);
}

child(pidc: chan of int)
{
	pid := sys->pctl(0, nil);
	sys->print("Child:	My pid is [%d]\n", pid);

	pidc <-= pid;

	exit;
}

シツケヤキイフ

; ./pid
Pid test program started...
Parent: My pid is [66]
Child:  My pid is [67]
Parent: Child pid is [67]
;

[PR]中古車探しは、ガリバー:在庫多数、全車保証つき!