• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/ruby-106/ruby/test/ruby/

Lines Matching refs:Process

12     Process.waitall
16 Process.waitall
40 Process.wait spawn(RUBY, "test-script")
46 Process.getrlimit(nil)
48 assert_raise(NotImplementedError) { Process.setrlimit }
50 assert_raise(ArgumentError) { Process.setrlimit }
55 Process.getrlimit(nil)
70 Process.setrlimit(Process::RLIMIT_NOFILE, limit)
84 Process.wait pid
109 if Process.const_defined? "RLIMIT_#{name}"
110 assert_nothing_raised { Process.getrlimit(name) }
112 assert_raise(ArgumentError) { Process.getrlimit(name) }
115 assert_raise(ArgumentError) { Process.getrlimit(:FOO) }
116 assert_raise(ArgumentError) { Process.getrlimit("FOO") }
121 assert_raise(ArgumentError) { Process.setrlimit(:CORE, :FOO) }
124 cur, max = Process.getrlimit(:NOFILE)
125 Process.setrlimit(:NOFILE, [max-10, cur].min)
127 Process.setrlimit(:NOFILE, :INFINITY)
134 cur, max = Process.getrlimit(:NOFILE)
135 Process.setrlimit(:NOFILE, [max-10, cur].min)
137 Process.setrlimit(:NOFILE, "INFINITY")
150 Process.wait Process.spawn(*TRUECOMMAND, {})
153 Process.wait Process.spawn(*TRUECOMMAND, :foo => 100)
156 Process.wait Process.spawn(*TRUECOMMAND, Process => 100)
164 io = IO.popen([RUBY, "-e", "print Process.getpgrp"])
165 assert_equal(Process.getpgrp.to_s, io.read)
168 io = IO.popen([RUBY, "-e", "print Process.getpgrp", :pgroup=>true])
173 assert_raise(Errno::EPERM) { Process.wait spawn(*TRUECOMMAND, :pgroup=>2) }
175 io1 = IO.popen([RUBY, "-e", "print Process.getpgrp", :pgroup=>true])
176 io2 = IO.popen([RUBY, "-e", "print Process.getpgrp", :pgroup=>io1.pid])
179 Process.wait io1.pid
180 Process.wait io2.pid
192 max = Process.getrlimit(:CORE).last
196 "p Process.getrlimit(:CORE)", :rlimit_core=>n]) {|io|
202 "p Process.getrlimit(:CORE)", :rlimit_core=>n]) {|io|
208 "p Process.getrlimit(:CORE)", :rlimit_core=>[n]]) {|io|
214 "p Process.getrlimit(:CORE)", :rlimit_core=>[m,n]]) {|io|
220 "p Process.getrlimit(:CORE)", :rlimit_core=>[m,n]]) {|io|
226 "p Process.getrlimit(:CORE), Process.getrlimit(:CPU)",
254 Process.wait Process.spawn({"FOO"=>"BAR"}, prog)
258 Process.wait Process.spawn({"FOO"=>"BAR"}, [prog, "blar"])
353 Process.exec({"mgg" => "mggoo"}, [prog, prog])
397 Process.wait Process.spawn(*PWD, :chdir => "d/notexist")
455 Process.wait Process.spawn(*ECHO["a"], STDOUT=>["out", File::WRONLY|File::CREAT|File::TRUNC, 0644])
461 Process.wait Process.spawn(*ECHO["0"], STDOUT=>["out", File::WRONLY|File::CREAT|File::APPEND, 0644])
464 Process.wait Process.spawn(*SORT, STDIN=>["out", File::RDONLY, 0644],
467 Process.wait Process.spawn(*ECHO["b"], [STDOUT, STDERR]=>["out", File::WRONLY|File::CREAT|File::TRUNC, 0644])
470 #Process.wait Process.spawn(*ECHO["a"], STDOUT=>:close, STDERR=>["out", File::WRONLY|File::CREAT|File::TRUNC, 0644])
473 Process.wait Process.spawn(*ECHO["c"], STDERR=>STDOUT, STDOUT=>["out", File::WRONLY|File::CREAT|File::TRUNC, 0644])
476 Process.wait Process.spawn(*ECHO["d"], STDOUT=>f)
481 Process.wait Process.spawn(*ECHO["e"], opts)
485 Process.wait Process.spawn(*ECHO["ee"], opts)
492 Process.wait Process.spawn(*ECHO["f"], h)
497 Process.wait Process.spawn(*ECHO["f"], 1=>Process)
500 Process.wait Process.spawn(*ECHO["f"], [Process]=>1)
503 Process.wait Process.spawn(*ECHO["f"], [1, STDOUT]=>2)
506 Process.wait Process.spawn(*ECHO["f"], -1=>2)
508 Process.wait Process.spawn(*ECHO["hhh\nggg\n"], STDOUT=>"out")
510 Process.wait Process.spawn(*SORT, STDIN=>"out", STDOUT=>"out2")
516 Process.wait Process.spawn("non-existing-command", (3..60).to_a=>["err", File::WRONLY|File::CREAT])
539 Process.wait(pid)
558 Process.wait pid;
574 Process.wait pid
582 assert_raise(Errno::EBADF) { Process.wait spawn(*TRUECOMMAND, closed_fd=>closed_fd) }
590 Process.wait pid
607 Process.wait spawn(RUBY, "-e", "STDERR.print 'err'; STDOUT.print 'out'",
611 Process.wait spawn(RUBY, "-e", "STDERR.print 'err'; STDOUT.print 'out'",
616 Process.wait spawn(RUBY, "-e", "STDERR.print 'err'; STDOUT.print 'out'",
628 assert_raise(ArgumentError) { Process.wait spawn(*TRUECOMMAND, STDOUT=>[:child, STDOUT]) }
629 assert_raise(ArgumentError) { Process.wait spawn(*TRUECOMMAND, 3=>[:child, 4], 4=>[:child, 3]) }
630 assert_raise(ArgumentError) { Process.wait spawn(*TRUECOMMAND, 3=>[:child, 4], 4=>[:child, 5], 5=>[:child, 3]) }
631 assert_raise(ArgumentError) { Process.wait spawn(*TRUECOMMAND, STDOUT=>[:child, 3]) }
639 Process.wait pid
693 Process.wait spawn(RUBY, '-e',
707 Process.wait spawn(RUBY, "s", :close_others=>false)
718 Process.wait
739 Process.wait spawn(RUBY, '-e', 'STDERR.reopen("err", "w"); IO.new(ARGV[0].to_i, "w").puts("mi")', w.fileno.to_s, :close_others=>true)
747 Process.wait spawn(RUBY, '-e', 'IO.new(ARGV[0].to_i, "w").puts("bi")', w.fileno.to_s, :close_others=>false)
758 Process.wait spawn(RUBY, "s", :close_others=>false)
770 Process.wait
779 Process.wait
788 Process.wait
815 Process.wait(pid)
831 Process.wait spawn(*TRUECOMMAND, h)
878 File.open("result", "w") {|t| t << "haha pid=#{$$} ppid=#{Process.ppid}" }
894 File.open("result", "w") {|t| t << "hihi pid=#{$$} ppid=#{Process.ppid}" }
899 Process.wait pid
911 print "fufu pid=#{$$} ppid=#{Process.ppid}"
930 print "fufumm pid=#{$$} ppid=#{Process.ppid}"
951 t << "hehe ppid=#{Process.ppid}"
953 t << "hehe pid=#{$$} ppid=#{Process.ppid}"
963 Process.wait pid
980 File.open("result1", "w") {|t| t << "taka pid=#{$$} ppid=#{Process.ppid}" }
984 File.open("result2", "w") {|t| t << "taki pid=#{$$} ppid=#{Process.ppid}" }
1011 File.open("result1", "w") {|t| t << "taku pid=#{$$} ppid=#{Process.ppid}" }
1015 File.open("result2", "w") {|t| t << "take pid=#{$$} ppid=#{Process.ppid}" }
1019 Process.wait pid
1033 Process.wait pid
1039 Process.wait pid
1051 puts "tako pid=#{$$} ppid=#{Process.ppid}"
1055 puts "tika pid=#{$$} ppid=#{Process.ppid}"
1081 File.open("result1", "w") {|t| t << "tiki pid=#{$$} ppid=#{Process.ppid}" }
1085 File.open("result2", "w") {|t| t << "tiku pid=#{$$} ppid=#{Process.ppid}" }
1093 Process.wait pid
1110 Process.wait spawn([RUBY, "poiu"], "-e", "exit 4")
1114 Process.wait
1120 Process.wait pid
1149 with_stdin("t") { Process.wait spawn([RUBY, "edc"]) }
1151 with_stdin("f") { Process.wait spawn([RUBY, "rfv"]) }
1169 assert_equal("#<Process::Status: pid #{ s.pid } exit #{ s.exitstatus }>", s.inspect)
1182 return unless Process.respond_to?(:kill)
1188 Thread.new { sleep 1; Process.kill(:SIGQUIT, pid) }
1189 Process.wait(pid)
1195 [["#<Process::Status: pid #{ s.pid } SIGQUIT (signal #{ s.termsig })>",
1196 "#<Process::Status: pid #{ s.pid } SIGQUIT (signal #{ s.termsig }) (core dumped)>"],
1208 assert_equal(pid, Process.wait)
1216 assert_equal([pid, 0], Process.wait2)
1224 ss = Process.waitall.sort
1244 assert_kind_of(Integer, Process.getpgid(Process.ppid))
1249 assert_kind_of(Integer, Process.getpriority(Process::PRIO_PROCESS, $$))
1254 if defined? Process::PRIO_USER
1256 pr = Process.getpriority(Process::PRIO_PROCESS, $$)
1257 Process.setpriority(Process::PRIO_PROCESS, $$, pr)
1263 assert_kind_of(Integer, Process.uid)
1267 gs = Process.groups
1274 assert_kind_of(Integer, Process.maxgroups)
1279 assert_kind_of(Integer, Process.euid)
1283 assert_nothing_raised(TypeError) {Process.euid += 0}
1289 assert_nothing_raised(TypeError) {Process.euid = user}
1294 assert_kind_of(Integer, Process.egid)
1298 assert_nothing_raised(TypeError) {Process.egid += 0}
1303 r = Process::UID.re_exchangeable?
1308 r = Process::GID.re_exchangeable?
1313 r = Process::UID.sid_available?
1318 r = Process::GID.sid_available?
1323 assert_nothing_raised { Process::Status.allocate.inspect }
1336 Process.wait pid
1366 assert_not_nil(pid = Process.spawn("./tmp_script.#{$$}"), feature)
1367 wpid, st = Process.waitpid2(pid)
1401 Process.spawn(cmds.join(sep), [STDOUT, STDERR]=>:close)
1426 Process.waitpid pid
1431 Process.kill(:KILL, pid) if (pid != 0) rescue false
1434 if Process.respond_to?(:daemon)
1438 Process.daemon
1447 Process.daemon(false, true)
1456 Process.daemon(true, true)
1468 Process.daemon(true, true)
1477 Process.daemon(false, true)
1487 Process.daemon(true, true)
1500 Process.daemon(true, true)
1528 [30000, [Process.uid, ENV["USER"]]].each do |uid, user|
1547 u = IO.popen([RUBY, "-e", "print Process.uid", uid: user||uid], &:read)
1556 skip "Process.groups not implemented on Windows platform" if windows?
1559 [30000, *Process.groups.map {|g| g = Etc.getgrgid(g); [g.name, g.gid]}].each do |group, gid|
1570 g = IO.popen([RUBY, "-e", "print Process.gid", gid: group], &:read)
1606 return unless Process.respond_to?(:setsid)
1607 return unless Process.respond_to?(:getsid)
1608 # OpenBSD doesn't allow Process::getsid(pid) when pid is in
1613 Marshal.dump(Process.getsid, STDOUT)
1614 newsid = Process.setsid
1622 # test Process.getsid() w/o arg
1623 assert_equal(Marshal.load(io), Process.getsid)
1625 # test Process.setsid return value and Process::getsid(pid)
1626 assert_equal(Marshal.load(io), Process.getsid(io.pid))
1628 Process.kill(:KILL, io.pid) rescue nil
1629 Process.wait(io.pid)