Opened 12 years ago

Closed 12 years ago

#652 closed defect (fixed)

*stderr* not flushed on quit

Reported by: stassats Owned by: gb
Priority: normal Milestone:
Component: Runtime (threads, GC) Version: trunk
Keywords: Cc:


I'm not really sure how right it is, but the attached patch fixes this issue for me. And regarding the code, I don't know what unwind-protect is doing there, since it doesn't have clean-up forms.

And a related issue, why is *error-output* bound to ccl:*stderr* only with --batch option? related source line

Attachments (2)

stderr-flush.diff (1.4 KB) - added by stassats 12 years ago.
stderr-flush-2.diff (1.4 KB) - added by stassats 12 years ago.

Download all attachments as: .zip

Change History (8)

Changed 12 years ago by stassats

comment:1 Changed 12 years ago by stassats

And *stderr* isn't also auto-flushed, but I don't know whether this is desirable.

comment:2 Changed 12 years ago by rme

I've argued before (in another bug-tracking system) that it's unwarranted to assume that *error-output* corresponds to some operating system dependent notion of a standard error output. It seems appropriate to me to open /dev/stderr or whatever and bind *error-output* to that stream if you need to ensure that the output goes exactly where you want it. (That's what the i/o customization variables are for, after all.)

Maybe I'm just being obstinate and need to get with the times. All the world's a VAX, er, a Linux box, right?

comment:3 Changed 12 years ago by stassats

Well, one sure can bind it to whatever one likes, but it'd be nicer if it was already bound. I noticed that during quick testing of my functions, and unexpected behavior added some confusion for a moment. After all, I'm indeed running Linux, and I got that behavior from SBCL and CLISP.

Changed 12 years ago by stassats

comment:4 Changed 12 years ago by stassats

I don't mind so much *error-output* not being a stderr, but could other issues be resolved? I don't see any reason why *stderr* shouldn't be flushed. And regarding unwind-protect, i guess a parentheses is misplaced and there should be lock releasing bit in the clean-up form. I attached a modified patch with corrected unwind-protect.

comment:5 Changed 12 years ago by rme

(In [13636]) Flush ccl::*stderr* on quit. Patch from Stas Boukarev. (see ticket:652)

comment:6 Changed 12 years ago by stassats

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.