From: Yohanes Santoso Date: 2006-07-12T04:52:35+09:00 Subject: Re: Processes and Portability Name Name writes: > a=IO.popen("program > logfile"), but on Windows this creates two > processes, cmd.exe and program. a.pid only gives the pid of cmd.exe. > And the behavior on *nix seems to be just the program (although I can be > wrong). The behaviour in *nix depends on your /bin/sh. Some shells gives the child's pid, other gives the pid of itself. pdksh gives the pid of itself. bash gives the pid of the child (the behaviour you wanted). Don't know about other shells. The lesson here, you can't get the pid of the child consistently unless you do the forking yourself. YS