Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001733 [Resin] minor always 05-14-07 15:26 05-22-07 15:45
Reporter ferg View Status public  
Assigned To ferg
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 3.1.2 Product Version
  Product Build
Summary 0001733: LD_LIBRARY_PATH
Description (rep by George Cox)


One thing which came out of it was that I noticed that LD_LIBRARY_PATH
is not being passed down to the child/worker JVM by the watchdog JVM
when the latter invokes it, but DYLD_LIBRARY_PATH is. Is that
intentional? This means that I have to put my Tibco JNI libraries in
the resin/libexec/ directory which sucks.

Something like this would be handy:

    static Map<String,String> watchdogEnvironment = System.getenv();

    ProcessBuilder processBuilder = new ProcessBuilder(argv);
    Map<String, String> envp = processBuilder.environment();
    envp.put("LD_LIBRARY_PATH",
watchdogEnvironment.get("LD_LIBRARY_PATH"));

        Process process = null;
        try {
            process = processBuilder.start();
        } catch (IOException e) {
            e.printStackTrace();
        }


Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
(0001912)
gjvc
05-15-07 03:58

Hi,

The preferable behaviour is to pass _all_ environment variables from the watchdog process to the child. So this:

    ProcessBuilder processBuilder = new ProcessBuilder(argv);
    processBuilder.environment().putAll(System.getenv());

    Process process = null;
    try {
        process = processBuilder.start();
    } catch (IOException e) {
        e.printStackTrace();
    }


...is better than this:

    Map<String,String> watchdogEnvironment = System.getenv();
    ProcessBuilder processBuilder = new ProcessBuilder(argv);
    Map<String, String> envp = processBuilder.environment();
    envp.put("LD_LIBRARY_PATH", watchdogEnvironment.get("LD_LIBRARY_PATH"));

    Process process = null;
    try {
        process = processBuilder.start();
    } catch (IOException e) {
        e.printStackTrace();
    }


gjvc
 

- Issue History
Date Modified Username Field Change
05-14-07 15:26 ferg New Issue
05-15-07 03:58 gjvc Note Added: 0001912
05-15-07 22:28 gjvc Issue Monitored: gjvc
05-22-07 15:45 ferg Assigned To  => ferg
05-22-07 15:45 ferg Status new => closed
05-22-07 15:45 ferg Resolution open => fixed
05-22-07 15:45 ferg Fixed in Version  => 3.1.2


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
30 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker