Closed Bug 156505 Opened 23 years ago Closed 23 years ago

xpcshell is missing a fflush

Categories

(Core :: XPConnect, defect)

x86
OS/2
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: timeless, Assigned: mkaply)

References

()

Details

Attachments

(1 file, 2 obsolete files)

os/2 4.52, nightly from today I ran xpcshell and didn't get a prompt which confused me, i thought it was still loading... [C:\drop\mozilla-nightly]xpcshell 1 js> 1 1+1 js> js> 2 the prompt isn't appearing until after the input or something.. i guessed fflush and mkaply confirms that it fixes it.
Attached patch Fix (obsolete) — Splinter Review
Added fflush in the prompt case. Should we fflush after each fprintf?
Comment on attachment 90640 [details] [diff] [review] Fix r=dbradley It's ambiguous enough that adding this is probably the right thing to do. There's a good discussion at: http://groups.google.com/groups?q=printf+stdin+buffer+line+%22interactive+devic e%22+console&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=PSHUANG.93May28210433%40ninja.mit .edu&rnum=1 No, we shouldn't need this on every fprintf. The one for the prompt should suffice, since it's always the last thing printed before input is asked, thus all previous output will be flushed as well
Attachment #90640 - Flags: review+
Since you did the patch, do you want to see that it gets in. Feel free to throw it back my way if you want.
Assignee: dbradley → mkaply
Would this not also be a problem in js.c too? It is good to keep the common portions of these two apps in sync.
Attached patch Merged patch per jband (obsolete) — Splinter Review
Attachment #90640 - Attachment is obsolete: true
Attachment #115403 - Attachment is obsolete: true
Comment on attachment 115404 [details] [diff] [review] Let's try this again brendan, could you r/sr this one? It's an easy change. thanks
Attachment #115404 - Flags: superreview?(brendan)
Attachment #115404 - Flags: superreview?(brendan) → superreview+
Fix checked in.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Checkin verified -
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: