#251 external_parsers doesn't report execv failure

Include_in_3.2
closed-fixed
htdig (103)
5
2005-07-27
2004-12-17
No

There is a bug in the external_parsers handling of
htdig (versions 3.1.6 and 3.2.0b6). htdig does a fork()
and execv() to call the script, and if the execv()
fails the child process exits, as it should. But, the
child process exits using the exit() function, rather
than _exit(), which is a no-no in a child process. The
problem is that the fork() makes a duplicate of
everything in the parent process, including all the
parent's I/O buffers. If the child process calls
exit(), it flushes its copy of the parent's stdout
buffer, so a copy of much of the parent's verbose
output gets flushed out into the child's pipe, which
the parent reads and parses. The fix is to change
htdig/ExternalParser.cc to put out an error message and
call _exit() if the execv() fails. See

http://sourceforge.net/mailarchive/forum.php?thread_id=6179686&forum_id=2691

for details and a patch. The patch needs to be tested,
and if it works correctly, be committed to CVS.

Discussion

  • Gilles Detillieux

    • milestone: --> Include_in_3.2
    • status: open --> pending-fixed
     
  • Gilles Detillieux

    Logged In: YES
    user_id=149687

    Just fixed in CVS for next 3.2 release. Needs to be done in
    3.1.x too.

     
  • SourceForge Robot

    Logged In: YES
    user_id=1312539

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     
  • SourceForge Robot

    • status: pending-fixed --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks