[osiris-devel] Bug: osirisd 3.0.4 does't daemonize correctly...

Alexei_Roudnev at exigengroup.com Alexei_Roudnev at exigengroup.com
Mon Mar 15 18:32:10 EST 2004


I saw it in 2.2.0 and I was sure that problem was resolved. 

Temporary solution:

(1) NEVER start and stop daemons by this way, do it by running 
/etc/init.d/daemon start or ... stop
/File name depends, of course/

(2) In this init file,   use 'nohup' or some other method to get rid of 
the control terminal.

OR - don't login as a root, login as a user and then 'su' or 'sudo'. 
(signal, sent by user, can not kill root process).

It is well known problem with many daemons, caused by SIGHUP signal and 
some other issues, when control terminal is closed.

 
Alex Roudnev
Exigen Group 





"Yazz D. Atlas" <yazz at osdn.com>
Sent by: 
osiris-devel-bounces+alexei_roudnev=exigengroup.com at lists.shmoo.com
03/15/2004 03:07 PM
Please respond to Osiris Developers

 
        To:     osiris-devel at lists.shmoo.com
        cc: 
        Subject:        [osiris-devel] Bug: osirisd 3.0.4 does't daemonize correctly...


Since playing around with Osiris lately I found an item I think is a 
bug. Ssh into a system and stop osirisd by hand and them restart it 
using the command bellow. Now try to exit that ssh session, it just hangs.

( example of what I'm talking about )

# /usr/local/sbin/osirisd -r /usr/local/osiris/
# exit
logout
(just hangs here)

You might want to look at the following URL for some code to solve this. 
(I'm not a programmer so forgive me if I can't submit my own patch)

http://www.erlenstar.demon.co.uk/unix/faq_2.html#SEC16

(cut and pasted from above URL)

A daemon process is usually defined as a background process that does 
not belong to a terminal session. Many system services are performed by 
daemons; network services, printing etc.

Simply invoking a program in the background isn't really adequate for 
these long-running programs; that does not correctly detach the process 
from the terminal session that started it. Also, the conventional way of 
starting daemons is simply to issue the command manually or from an rc 
script; the daemon is expected to put itself into the background.


-- 
  Yazz D. Atlas <yazz at osdn.com>          Voice: 408-802-9608 (cell)
  Senior Systems Engineer / Senior BOFH    Fax: 510-226-8814
  [ O | S | D | N ]    Open Source Development Network / VA Software
  http://www.osdn.com        47071 Bayside Parkway Fremont, CA 94538
  AIM:"Entropy Works 42" IRC:"Aaton irc.slashnet.org" ICQ:"11445680"
        gpg --keyserver  wwwkeys.pgp.net --recv-key 0x0C57DDA0
        GPG: 644C E9FF D0AF 3C5E 5C73 5E05 00EF C7EC 0C57 DDA0
_______________________________________________
osiris-devel mailing list
osiris-devel at lists.shmoo.com
https://lists.shmoo.com/mailman/listinfo/osiris-devel


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/osiris-devel/attachments/20040315/76a3da2a/attachment.htm 


More information about the osiris-devel mailing list