in reply to Windows fork problem or my ignorance?
Some quick debugging shows that the print loop is reached, but that the hash is empty.
return 0 if $pid < 0; wasn't adjusted for the OS.
Windows doesn't support forking. When you call fork a thread is actually created. For those pseudo-processes, $$ is negative, so wait can return a negative number on success.
Use return 0 if $pid == -1; instead.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Windows fork problem or my ignorance?
by romandas (Pilgrim) on Mar 21, 2008 at 12:59 UTC | |
by ikegami (Patriarch) on Mar 21, 2008 at 22:56 UTC |