Solved

nohup & signals

Posted on 1999-01-04
1
241 Views
Last Modified: 2010-04-21
I have to run a process (agent) from a client. The
process should keep running until someone stops it even if
the user that started the process leaves the application.
I'm using the nohup option but it doesn't work when
I run the process from this platform (similar to VB).
It starts ok BUT dies when I leave the application.
If I run the same command from the Terminal Window I
have no problem and the process keeps running when I
leave the application. Is it clear?
0
Comment
Question by:sanjua
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 1

Accepted Solution

by:
ramshakal earned 100 total points
ID: 2008608
Processes run by /usr/bin/nohup are immune to SIGHUP (hangup) and SIGQUIT (quit) signal. where as those run by /usr/xpg4/bin/nohup are immune to SIGHUP.
  So when you start it from terminal it works all right because in that case it only
receives SIGHUP signal.
  For running it from an application why not you make it a daemon and catch all the signal
SIGHUP, SIG_IGN and SIGCLD.
   
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question