[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev Lynx returns error 11 when called from cgi

From: Klaus Weide
Subject: Re: lynx-dev Lynx returns error 11 when called from cgi
Date: Fri, 11 Dec 1998 19:11:27 -0600 (CST)

On Fri, 11 Dec 1998, Faith Zack wrote:

> Can you tell me what circumstance would cause Lynx
> to return 11?  I am exec'ing lynx -dump from a java
> program, and reading its output using the following
> code:
>         try{
>           Runtime r = Runtime.getRuntime();
>           Process p;
>           p = r.exec("/usr/local/bin/lynx -dump "+url);         
>           p.waitFor();
> System.out.println("process status: " + p.exitValue()); //debug
>           InputStreamReader isr = new InputStreamReader(p.getInputStream());
>           BufferedReader br = new BufferedReader(isr);
>           String textdata;
>           try{
>                 while(true) {
>                         textdata = br.readLine();
>                         if (textdata == null) break;
>                         text += "\n"+textdata;
>                 }
>           } catch (EOFException e ) {
>                 ;//done
>           }
>           br.close();
>           isr.close();
>         }
> --
> When I run my Java application from a cgi program I get process status=11,
> but when I run it from the command line (even as user 'nobody') it works 
> fine (process status = 0).  Any idea what the problem might be?
> ps. Please "CC" me on your response, as I am not on the list.

[ Please continue sending to lynx-dev. ]

What does the return value from p.exitValue() mean, is it a normal
return value or perhaps a signal number?  You are the java guy, so
you should know...

Try adding -trace to the lynx flags, that should create a Lynx.trace
file in the home directory.  (But does the cgi user have one?)
Or add -trace -tlog, that should dump trace output to stderr.

Lynx needs access to a lynx.cfg file, add -cfg=... to make sure it
finds the right one.  Try setting STARTFILE in lynx.cfg to a local
file://localhost/... URL, and test your app with a file://localhost/...,
to eliminate domain name lookup problems.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]