Solved

nohup & signals

Posted on 1999-01-04
1
236 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

930 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now