Ignore:
Timestamp:
Jun 29, 2012, 10:06:36 PM (13 years ago)
Author:
dmik
Message:

icedtea-web: Make sure parent ends of pipes are not inherited by child.

This is necessary for read() on the child's side to abort when the parent
closes its ends. This fixes the JAVA process hang when the browser
terminates.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/icedtea-web/plugin/icedteanp/IcedTeaNPPlugin.cc

    r383 r384  
    4545#include <emx/startup.h>
    4646#include <sys/socket.h>
     47#include <fcntl.h>
    4748#include "OS_OS2.h"
    4849#endif
     
    545546  // change this behaviour if we find pages with multiple applets that
    546547  // rely on being run in the same VM.
     548
     549#ifdef __OS2__
     550  // make sure parent ends are not inherited by the child (otherwise read() on
     551  // the child's side will not be aborted when the parent closes its end)
     552  fcntl (in_pipe [0], F_SETFD, FD_CLOEXEC);
     553  fcntl (out_pipe [0], F_SETFD, FD_CLOEXEC);
     554#endif
    547555
    548556  np_error = plugin_start_appletviewer (data);
Note: See TracChangeset for help on using the changeset viewer.