Problem with "Daemon not connected" 
Author Message
 Problem with "Daemon not connected"

I am having a problem with a script and hope someone here can help.

I have a Ruby script that includes an "open" method call to create a
subprocess and return a string.  Shown here is a much simplified
version where I can recreate the problem.

$f = File.open("/tmp/foo.log", "a")
#cmdline = "|ls -l"
cmdline = "|/opt/localname/bar ..."
s = open(cmdline)
s.each do |line|
  $f.print line
done

When this script is executed from the command line shell the "open"
method succeeds for the /opt/localname/bar program.

However, when the script is executed from within a shell script the
method fails.

Instead of printing the expected results the message "Daemon not
connected" is printed.

The "ls -l" command works in either situation.  

I have reviewed the environment variables and there does not seem to
be anything relevant there.  Any thoughts?  Pointing out a stupid
mistake would be great!



Sun, 27 Nov 2005 22:48:36 GMT  
 Problem with "Daemon not connected"

Quote:

> Instead of printing the expected results the message "Daemon not
> connected" is printed.

This message is outputted from the '/opt/localname/bar' application.
The conditions under which its run must somehow be different ?

Can you recall this "Daemon not connected" message if you invoke the
application manualy from the command line ?

--
Simon Strandgaard



Sun, 27 Nov 2005 23:24:42 GMT  
 Problem with "Daemon not connected"
Hi,

At Thu, 12 Jun 2003 00:32:37 +0900,

Quote:

> > Instead of printing the expected results the message "Daemon not
> > connected" is printed.

> This message is outputted from the '/opt/localname/bar' application.
> The conditions under which its run must somehow be different ?

> Can you recall this "Daemon not connected" message if you invoke the
> application manualy from the command line ?

Or directly within shell script, rather than from ruby.

  /opt/localname/bar ... >> /tmp/foo.log

If you could reproduce same error, you'd better to ask the
author of the application.

--
Nobu Nakada



Sun, 27 Nov 2005 23:54:23 GMT  
 Problem with "Daemon not connected"

Thanks to all for the help.  I did run a "strings" on the executable and did
find the statement "Daemon not connected".  I will now track that down.  

Quote:
-----Original Message-----

Sent: Wednesday, June 11, 2003 11:54 AM

Subject: Re: Problem with "Daemon not connected"

Hi,

At Thu, 12 Jun 2003 00:32:37 +0900,

> > Instead of printing the expected results the message "Daemon not
> > connected" is printed.

> This message is outputted from the '/opt/localname/bar' application.
> The conditions under which its run must somehow be different ?

> Can you recall this "Daemon not connected" message if you invoke the
> application manualy from the command line ?

Or directly within shell script, rather than from ruby.

  /opt/localname/bar ... >> /tmp/foo.log

If you could reproduce same error, you'd better to ask the
author of the application.

--
Nobu Nakada



Mon, 28 Nov 2005 00:20:01 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Starting "daemon-like" processes with exec

2. Running tclhttpd as a "daemon"

3. Tcl: "image does not exist" problem

4. string.join(["Tk 4.2p2", "Python 1.4", "Win32", "free"], "for")

5. "OS/2 CONNECT" Newsletter

6. "Connected region" puzzle

7. Concurrency (Connected to "Starting Again...")

8. Tk remote controller ("connect")

9. "VA Smalltalk-Web Connect-Contract"

10. Match "ab" in "abc", but not in "abd"

11. A python program as a Win "Service" or Unix "Daemon"?

12. BEGIN{want[]={"s1o", "s2o", "s2q", "s3q"}

 

 
Powered by phpBB® Forum Software