Bert,
Bert Freudenberg wrote:
On Tue, 12 Mar 2002, David T. Lewis wrote:
That's amazing, I never would have figured this out! I get exactly the same result on my system: Run Squeak with the -xshm command line option, open a "Squeak shell", run a command that generates output on stderr, and <BOOM>, stack dump.
This also is discovered by running "UnixProcess runTests". Which also points at a problem with PipeableOSProcess: it is undeclared?
Actually, CommandShell and IOHandle are undeclared, too. You shouldn't just use the class names in the code but something like "Smalltalk classNamed: 'CommandShell'".
OIC. These come from the CommandShell changeset. It would be nice to decouple both (as, I guess, you intended).
I think that this is going to be some obscure problem in sqXWindow.c, but it will be a hard bug to find. Whatever the problem is, at least it is repeatable now.
It is just not a good idea to call shmExit() in the child.
Also, you should be using _exit() instead of exit() when exec() failed, because the latter calls the atexit functions which harm the running image.
I'll attach a changeset. Do I get a T-Shirt now? :-)
-- Bert
PS: David: I don't think it is a great idea to start plugin translation in the postscript of a changeset. Also, if there was no OSProcessPlugin before, inspecting the current process makes little sense.
Stefan: And removing the security check is not a good idea, either. Why did you do this?
Do you mean me (Stephan)? I have added UnixOSProcessPlugin>>sandboxSecurity as workaround for the previous version of the plugin, (I think it was) to get it compiled. Now this method is supplied by the current version in OSProcessPlugin. To be as incremental as not incremental to my previous fix cs, I have left the removal in it, though it is not necessary for the current plugin (since there is no UnixOSProcessPlugin>>sandboxSecurity).
Greetings,
Stephan
PS: Without looking deeper: Thank you for the bug fixing!
Name: OSProcessShmFix-bf.1.cs.gz
OSProcessShmFix-bf.1.cs.gz Type: application/x-gunzip Encoding: BASE64