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

Alexei Roudnev Alexei_Roudnev at exigengroup.com
Wed Mar 17 13:27:18 EST 2004


MessageIt is not a big problem (manual start) - as I was saying, the safest way to do it is to login as a user, then use su or sudo -s.

Unfortunately, some rc files/scripts send SIG_HUP when finised, so if daemon aborts on this signal, it can be aborted when RC script finished.
May be, it is not an issue on modern OS, but I saw it a few tims in past.

Anyway, daemon should be _daemon_. It is a bug.

  ----- Original Message ----- 
  From: Luke West 
  To: 'Osiris Developers' 
  Cc: 'osiris-devel-bounces+alexei_roudnev=exigengroup.com at lists.shmoo.com' 
  Sent: Wednesday, March 17, 2004 7:31 AM
  Subject: RE: [osiris-devel] Bug: osirisd 3.0.4 does't daemonize correctly. ..


  All,

  If you have ssh'd from machine1 to machine 2, there is a way to get out of the session on machine 2, but it is brutal. Use the interrupt built into SSH ~. (tilde dot)

  L.
    -----Original Message-----
    From: Alexei_Roudnev at exigengroup.com [mailto:Alexei_Roudnev at exigengroup.com] 
    Sent: 15 March 2004 23:32
    To: Osiris Developers
    Cc: osiris-devel-bounces+alexei_roudnev=exigengroup.com at lists.shmoo.com; osiris-devel at lists.shmoo.com
    Subject: Re: [osiris-devel] Bug: osirisd 3.0.4 does't daemonize correctly...



    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





------------------------------------------------------------------------------


  _______________________________________________
  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/20040317/91b6545d/attachment.htm 


More information about the osiris-devel mailing list