Solved

nohup & signals

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
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 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 navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

706 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

19 Experts available now in Live!

Get 1:1 Help Now