Sponsored Content
Full Discussion: A doubt on Daemons
Operating Systems Linux A doubt on Daemons Post 74659 by Sergiu-IT on Saturday 11th of June 2005 01:37:30 PM
Old 06-11-2005
Quote:
Originally Posted by marioh
Is there a way for A to find out B's return code?
Is there a way for A to find out when B ends?
Hi, there !
For the first question, I'm not sure... probably if you start it from a shell script or if you start it manualy, you can check the $? variable ( echo $? ).
For the second question, if A is a script shell or something like this, you can try this : ps aux | grep B_daemon_name. After this, like on the first question, check the $? variable. If it's value is 0, then everything is ok. If the value is 1 or something else, there was an error or your daemon is death Smilie
I hope this helped.
Good luck !
 

9 More Discussions You Might Find Interesting

1. IP Networking

DNS daemons

Does anyone know the command to start the DNS Daemon. I looked in the /etc/init.d/inetsvc file and it tells me what the text should look like. When I go to open the corresponding files they are encoded and I can't read them. So is there a command that will start the DNS daemon? If... (8 Replies)
Discussion started by: Deuce
8 Replies

2. Cybersecurity

root owner of daemons?

Hi all, what happens if i have a service running as root? if it is exploited what would happen? can a hacker actually becomes a hacker and screw up my whole box? thanks (1 Reply)
Discussion started by: xNYx
1 Replies

3. UNIX for Dummies Questions & Answers

Daemons

MYSQL-daemon don't started automatically by system-start. And same trouble with httpd too. I have SuSE 8.0. What can I do ? Thanks.... (6 Replies)
Discussion started by: Pennywize
6 Replies

4. Solaris

SUN SOLARIS boot: start daemons

Hi, I have a problem on a Solaris 9 server! After a restart some daemons don't start and I have to start them manually! I thing that everything is ok in the /sbin/rc3 script! And if I run manually the "/etc/init.d/xxx start" the services start without problem. I didn't find anything in... (1 Reply)
Discussion started by: ctap
1 Replies

5. UNIX for Dummies Questions & Answers

Starting daemons at reboot.

I rebooted my server (solaris 5.8) and I had to manually start the cron and mailx daemons. How do I get these to automatically start at reboot? Thanks in advance. (2 Replies)
Discussion started by: shorty
2 Replies

6. Shell Programming and Scripting

piping and backgroud processes (daemons)

Hello to all, I've a strage problem here: a perl script that parses the output of sar -q 300 0 (one line of performace data each 5 min. infinately) works fine from the CLI. It processes one line output every 5 minutes. If i disconnect it from the terminal (executing it with cron, nohup startporc... (2 Replies)
Discussion started by: demwz
2 Replies

7. Shell Programming and Scripting

daemons definition

hi there, can somebody give me a definition for daemons, or example what are they !! and what the use for? i've done some research and all what i found is /etc/... or /usr/bin/... and i haven't quietly got the concept. any ideas !! Thanks. (5 Replies)
Discussion started by: new2Linux
5 Replies

8. HP-UX

status of daemons

Hi there all, Hey, is there a way to get the status of all daemons running on a HPUX? in an easy way? Like the same way how to vieuw the status of packages in cmviewcl. Thanks! (1 Reply)
Discussion started by: draco
1 Replies

9. Solaris

Command to list down all daemons in Solaris

Hi All, Is there any command to list all running daemons in Solaris. I should able to see only running daemons. Regards, SKumar (5 Replies)
Discussion started by: nskumar
5 Replies
launchd(8)						    BSD System Manager's Manual 						launchd(8)

NAME
launchd -- System wide and per-user daemon/agent manager DESCRIPTION
launchd manages processes, both for the system as a whole and for individual users. The primary and preferred interface to launchd is via the launchctl(1) tool which (among other options) allows the user or administrator to load and unload jobs. Where possible, it is preferable for jobs to launch on demand based on criteria specified in their respective configu- ration files. launchd also manages XPC services that are bundled within applications and frameworks on the system. During boot launchd is invoked by the kernel to run as the first process on the system and to further bootstrap the rest of the system. You cannot invoke launchd directly. NOTES
On Darwin operating systems, the canonical way to launch a daemon is through launchd as opposed to traditional POSIX and POSIX-like mecha- nisms or mechanisms provided in earlier versions of OS X. These alternate methods should be considered deprecated and not suitable for new projects. In the launchd lexicon, a daemon is, by definition, a system-wide service of which there is one instance for all clients. An agent is a ser- vice that runs on a per-user basis. Daemons should not attempt to display UI or interact directly with a user's login session. Any and all work that involves interacting with a user should be done through agents. XPC services which are marked with a ServiceType of System are functionally equivalent to daemons and run in the same environment, sharing the same Mach bootstrap namespace. XPC services which are marked with a ServiceType of User are equivalent to agents with the LimitLoadToSes- sionType key specifying the Background session and run in the same environment, sharing the same Mach bootstrap namespace. See launchd.plist(5) for more information about user sessions. On Darwin platforms, a user environment includes a specific Mach bootstrap subset, audit session and other characteristics not recognized by POSIX. Therefore, making the appropriate setuid(2) and setgid(2) system calls is not sufficient to completely assume the identity for a given user. Running a service as a launchd agent or a per-user XPC service is the only way to run a process with a complete identity of that user. FILES
~/Library/LaunchAgents Per-user agents provided by the user. /Library/LaunchAgents Per-user agents provided by the administrator. /Library/LaunchDaemons System-wide daemons provided by the administrator. /System/Library/LaunchAgents Per-user agents provided by Apple. /System/Library/LaunchDaemons System-wide daemons provided by Apple. SEE ALSO
launchctl(1), launchd.plist(5), DEVELOPER DOCUMENTATION
The Daemons and Services Programming Guide can be found at the following URL: https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/Introduction.html Darwin 25 November, 2013 Darwin
All times are GMT -4. The time now is 05:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy