Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Daemon process exits when Xterm is closed

 
Karthik Kannan
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Our project requirement is to create a java application and run it as a service (daemon) in Solaris. We used Java Service Wrapper to make a java app as a daemon process. The wrapper takes care of creating the daemon process (including file permission, executable scripts, etc.).

We are using Reflection (Xterm via Telnet) to connect to the Solaris box and start the service from there. The problem is that when we close the Xterm window, the deamon process gets killed.
We wanted the service to be alive even after closing the Xterm.

Any solutions to this..

Thanks in advance...
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not familiar with this project, but running a background Java process immune to hangup signals on UNIX is quite easy; the "nohup" program will do this for you. It's hard to imagine how this wrapper thingy would improve on just something like

% nohup java MyClass > outputfile 2> errorfile &
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic