I haven't been using Windows for over 10 years so I'm not entirely sure, but it might be possible that "cd" isn't an actual command but some sort of built-in shell function in command.com or whatever Windows uses these days. So maybe you get no PID at all, or the PID of the parent (the shell)?
Either way, "cd" might be a special case. Unless this really is what you want to do, I suggest you try using some other command.
In reply to Re: waitpid on Win32 ... wait forever
by december
in thread waitpid on Win32 ... wait forever
by syphilis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |