On 7/21/05, Jonathan Worthington <[EMAIL PROTECTED]> wrote: > "Jonathan Worthington" <[EMAIL PROTECTED]> wrote: > > "jerry gay" <[EMAIL PROTECTED]> wrote: > >> if i recall correctly, the options here are: 1) unix-like return value > >> from spawnw everywhere, 2) return platform-specific value, or 3) > >> return some object-like thingy. > >> > >> i don't like option 1, as i believe spawnw should return something > >> platform-specific. an object-like thingy (option 3) might be nice, and > >> is definitely shiny, but it doesn't exist, and requires more > >> specification. > >> > > Sorry, I wasn't clear in what I wrote. I was suggesting a 4th option - > > always return the exit code so the user can use it right away, as in we >> > > 8 it on UNIX platforms, leave it as is on Win32, etc. So if the exit code > > is 1, then Ix contains 1. No matter which platform you're on. User code > > has to do no shifts. > > > Just went and looked at what $? holds in Perl 5 and, well, it holds the > POSIX value. And the lower 8 bits actually can contain something useful > (the signal that terminated the program and whether it core dumped). So my > idea would have thrown away potentially useful info. That'd suck. > > I still think consistent is important, not something platform specific. So > here's my patch again, with the comments cleared up to say why we left shift > by 8. I think it's the right thing to do. > after further discussion (on #parrot) with chip and others, chip decided that the proper option for spawnw is to return an object-like thingy. and after this discussion, i fully agree, and take back my previous statements about platform-specific values being the way to go. that said...
> All spawnw.t passes on Win32 with this patch. > i'll apply this patch today. additionally, i'll add some text to ops/sys.ops specifying that spawnw should return something object-like. i've created a TODO ticket in RT for the spawnw object-like return. ~jerry