Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

nohup & signals

Posted on 1999-01-04
1
Medium Priority
?
248 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 200 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 does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
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.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses

636 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