Solved

nohup & signals

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
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…
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.

739 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