|
|
|
#9 |
|
Messages: n/a
Hébergeur: |
2007/9/18, Tim Pease <tim.pease@gmail.com>:
> On 9/17/07, Robert Klemme <shortcutter@googlemail.com> wrote: > > > > Here's another mechanism: > > > > loop do > > Process.waitpid( fork do > > # your program goes here > > end ) > > end > > > > Windows is the fork nazi ... "No fork for you!" $ ruby <<XXX > 3.times do |i| > Process.waitpid( fork { sleep 1; puts i } ) > end > XXX 0 1 2 $ uname -a CYGWIN_NT-5.1 padrklemme1 1.5.24(0.156/4/2) 2007-01-31 10:57 i686 Cygwin Now someone will be telling me that I'm cheating again. ;-) > But clever, nonetheless. Thanks! Kind regards robert |
|
|
|
#10 |
|
Messages: n/a
Hébergeur: |
2007/9/18, Robert Klemme <shortcutter@googlemail.com>:
> 2007/9/18, Tim Pease <tim.pease@gmail.com>: > > On 9/17/07, Robert Klemme <shortcutter@googlemail.com> wrote: > > > > > > Here's another mechanism: > > > > > > loop do > > > Process.waitpid( fork do > > > # your program goes here > > > end ) > > > end > > > > > > > Windows is the fork nazi ... "No fork for you!" PS: since the OP mentioned X I figured he might not be on X anyway. :-)) |
|
![]() |
| Outils de la discussion | |
|
|