2017-11-04から1日間の記事一覧
D言語でアプリケーションサーバを書いていて、そういえば普段良く使っているRubyのPumaだと、どういう実装をされているんだろう? というのが気になったので少し読んでみる。 server.rb まず読み始めるのはPuma::Serverクラスから。 クラスのインスタンス化…
core.sys.posix.unistdの中にある。使い方はforkそのまま。 import std.stdio; import core.thread; import core.stdc.stdlib; import core.sys.posix.unistd; void main() { auto pid = core.sys.posix.unistd.fork(); if (pid == 0) { writeln("child work…