From: Aredridel Date: 2003-05-13T09:21:44+09:00 Subject: Re: RCR for child execution On Mon, 2003-05-12 at 17:57, nobu.nokada@softhome.net wrote: > Hi, > > At Tue, 13 May 2003 08:47:36 +0900, > ahoward wrote: > > > I don't like this notation. But I like the idea of spawning child > > > with its stdin/out/err replaced. > > > > > > then why not 'spawn'? ;-) > > I vote it. > > > spawn 'command', :out => io, :err => io > > spawn ['command', 'arg1', 'arg 2'], :out => io, :err => io spawn 'command' do out = io err = io end.run => <#ExternalProc:0x0000> -- make it a full block, so that it's easily extensible. spawn could be a factory for ExternalProc objects (an alias for ExternalProc.new?). It would provide a good place for various operations on the spawned process as well -- pids, priorities, other methods that could be called later (kill, alive?), and if extended, would provide a logical place for RPC to happen. Ari > > And I suggest it'd be nice to be asynchronous. Then we can > rewrite popen, backticks and open3 more consistently. > > # BTW, have I posted a patch for it already?