Ignore:
Timestamp:
Oct 15, 2014, 10:44:36 AM (11 years ago)
Author:
dmik
Message:

icedtea-web: Use unnamed pipe instead of unix-style named pipe for debug console.

Similar to r368.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/icedtea-web/plugin/icedteanp/os2/java/sun/applet/PluginMainBase.java

    r431 r436  
    5252    private static int inPipe = -1;
    5353    private static int outPipe = -1;
     54    private static int debugPipe = -1;
    5455
    5556    static boolean checkArgs(String args[]) {
     
    6061                DeploymentConfiguration.move14AndOlderFilesTo15StructureCatched();
    6162                if (JavaConsole.isEnabled()) {
    62                     if ((args.length < 3) || !new File(args[2]).exists()) {
     63                    if ((args.length < 3) || (debugPipe = Integer.valueOf(args[2]).intValue()) < 0) {
    6364                        OutputController.getLogger().log(OutputController.Level.ERROR_ALL, "Warning, although console is on, plugin debug connection do not exists. No plugin information will be displayed in console (only java ones).");
    64                     } else {
    65                         JavaConsole.getConsole().createPluginReader(new File(args[2]));
    6665                    }
    6766                }
     
    8180        fdAccess.set(outPipeFD, outPipe);
    8281        streamHandler = new PluginStreamHandler(new FileInputStream(inPipeFD), new FileOutputStream(outPipeFD));
     82        if (JavaConsole.isEnabled() && debugPipe != -1) {
     83            FileDescriptor debugPipeFD = new FileDescriptor();
     84            fdAccess.set(debugPipeFD, debugPipe);
     85            JavaConsole.getConsole().createPluginReader(new FileInputStream(debugPipeFD));
     86        }
    8387        PluginDebug.debug("Streams initialized");
    8488        return streamHandler;
Note: See TracChangeset for help on using the changeset viewer.