Last Comment Bug 579249 - xpcshell should handle EINTR from fgets (makes attaching in gdb possible)
: xpcshell should handle EINTR from fgets (makes attaching in gdb possible)
Status: RESOLVED FIXED
[inbound]
:
Product: Core
Classification: Components
Component: XPConnect (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla7
Assigned To: Joe Drew (not getting mail)
:
: Andrew Overholt [:overholt]
Mentors:
Depends on:
Blocks: 563817
  Show dependency treegraph
 
Reported: 2010-07-15 20:51 PDT by Joe Drew (not getting mail)
Modified: 2011-06-30 05:50 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
handle EINTR (836 bytes, patch)
2010-07-15 20:51 PDT, Joe Drew (not getting mail)
no flags Details | Diff | Splinter Review
handle EINTR v2 (899 bytes, patch)
2010-07-15 21:13 PDT, Joe Drew (not getting mail)
timeless: review+
Details | Diff | Splinter Review

Description Joe Drew (not getting mail) 2010-07-15 20:51:06 PDT
Created attachment 457754 [details] [diff] [review]
handle EINTR

Right now, xpcshell exits gracefully whenever it gets a NULL return value from fgets(). However, there are valid NULL return values possible from fgets(), like when it's interrupted by a system call. 

This patch makes xpcshell not exit in those cases, which makes attaching to xpcshell in GDB possible.
Comment 1 Joe Drew (not getting mail) 2010-07-15 21:13:56 PDT
Created attachment 457758 [details] [diff] [review]
handle EINTR v2

testing ftw
Comment 2 timeless 2010-07-15 23:23:07 PDT
Comment on attachment 457758 [details] [diff] [review]
handle EINTR v2

similar code exists in js/shell/js.cpp, please patch it too
Comment 3 Josh Matthews [:jdm] (on vacation until Dec 5) 2011-06-15 13:09:11 PDT
I hit this every time I start developing on a mac again. What do we need to do to get this into the tree still?
Comment 4 Josh Matthews [:jdm] (on vacation until Dec 5) 2011-06-29 12:54:19 PDT
http://hg.mozilla.org/integration/mozilla-inbound/rev/b7b987a52c33
Comment 5 Marco Bonardo [::mak] 2011-06-30 05:50:01 PDT
http://hg.mozilla.org/mozilla-central/rev/b7b987a52c33

Note You need to log in before you can comment on or make changes to this bug.