Ruby ã§ã·ã§ã«ã®ãããªãã®ãä½ã£ã¦ã¿ãã¨ãRuby ã¨ã·ã§ã«ãã·ã¹ãã ã³ã¼ã«ã®ç解ãã§ãã¦ãç ä¿®ã®èª²é¡ã¨ãã«ããããããªããã¨10å¹´ãããåã«æã£ã¦ãã®ãããµã¨æãåºããã®ã§æ¸ãã¦ã¿ã¾ãã åºæ¬ ã·ã§ã«ã®åä½ãç°¡åã«èª¬æããã¨æ¬¡ã®ãããªæãã§ãã ããã³ãããåºå æ¨æºå ¥åããã³ãã³ãã©ã¤ã³ãèªã¿è¾¼ã èªã¿è¾¼ãã ã³ãã³ããå®è¡ãã ã³ãã³ãã®çµäºãå¾ ã¤ 1 ã«æ»ã ããããã®ã¾ã¾ Ruby ã§æ¸ãã¦ã¿ã¾ãã while true print '-> ' # ããã³ãã表示 cmd = gets or break # ã³ãã³ãå ¥å cmd.chomp! # æ«å°¾ã®æ¹è¡åé¤ pid = Process.fork do # åããã»ã¹çæ Process.exec [cmd, cmd] # ã³ãã³ãå®è¡ end Process.waitall # åããã»ã¹ã®çµäºå¾ ã¡ end Process
{{#tags}}- {{label}}
{{/tags}}