On Mon, 26 Sep 2011 17:52:02 -0400, Mehrdad <[email protected]> wrote:
On 9/26/2011 2:36 PM, Steven Schveighoffer wrote:
Hm... its hard for me to say. Why would it be calling _close before
main() is called? Very strange. Is there any more stack information?
Can you get it to crash by using a pipe from the command line?
In other words:
myprogram | more
or echo hi | miprogram
?
If this isn't killing the program in the same way, then it might be a
different issue than the one I fixed.
-Steve
Nope, pipes/redirections from the command prompt are all fine -- it just
crashes when run from SciTE (and also Notepad++, which I just verified).
After somewhat painful debugging, it seems like the stack trace is a
little off -- it actually happens when _exit() is called, which in turn
calls _fcloseall() or something.
Not sure what else I can do about it, though -- it's pretty clear the
handle was destroyed sometime before, but I don't know when.
This is likely a DMC issue, and is probably best reported as a DMC bug. I
don't know how much more you want to pursue this, but the next steps I'd
recommend are:
1. obtain the dmc compiler (it's free) if you haven't already.
2. Compile an empty C program and run it using SciTE and Notepad++.
Verify the same error occurs
3. report the failure using DMC's bugzilla.
I'm guessing there's something in the way SciTE or Notepad++ sets up the
pipes before executing the process which causes the problem. I have a
sinking feeling we'll see more of this issue when the new std.process is
released :(
-Steve