#172: [RESOURCE] A LSB-compliant initscript for Linux
--------------------------------------------+-------------------------------
 Reporter:  Jorge Godoy <[EMAIL PROTECTED]>  |        Owner:  anonymous
     Type:  enhancement                     |       Status:  new      
 Priority:  normal                          |    Milestone:  1.0      
Component:  Docs                            |      Version:           
 Severity:  normal                          |   Resolution:           
 Keywords:  reviewed                        |  
--------------------------------------------+-------------------------------
Comment (by ezio):

 A strange (for me!) thing happens: when I start the application, using
 command line or the init script, i have two process (running fedora4, tg
 trunk):
 {{{
 # ./start-astcdr.py &
 [1] 13868
 # ps -e -o user,pid,comm,cmd | grep astcdr
 root     13868 start-astcdr.py /usr/bin/python ./start-astcdr.py
 root     13869 python          /usr/bin/python ./start-astcdr.py
 # kill -2 13868
 # ps -e -o user,pid,comm,cmd | grep astcdr
 root     13869 python          /usr/bin/python ./start-astcdr.py
 }}}
 To stop the application I've to kill them both.
 The same thing happens in the initscript and killing the process saved
 with {{{echo $! > $PIDFILE}}}

 Now repeat, looking at the process group (pgid)
 {{{
 # ./start-astcdr.py &
 [1] 14041
 # ps -e -o user,pid,pgid,comm,cmd | grep astcdr
 root     14041 14041 start-astcdr.py /usr/bin/python ./start-astcdr.py
 root     14042 14041 python          /usr/bin/python ./start-astcdr.py
 }}}
 They have the same pgid, 14041. From kill man page a hypen (-) before pid
 means all process in the group:
 {{{
 # kill -2 -14041
 }}}
 works.
 Now with the init script:
 {{{
 # ./tg-astcdr start
 Starting astcdr                                            [  OK  ]
 # ps -e -o user,pid,pgid,comm,cmd | grep astcdr
 root     14140 14137 start-astcdr.py /usr/bin/python
 /home/ezio/web_works/astcdr/start-astcdr.py
 /home/ezio/web_works/astcdr/dev.cfg
 root     14142 14137 python          /usr/bin/python
 /home/ezio/web_works/astcdr/start-astcdr.py
 /home/ezio/web_works/astcdr/dev.cfg
 }}}
 The pgid number is 14137, where came out this number? Where can I find
 this number? Happens only to me???

-- 
Ticket URL: <http://trac.turbogears.org/turbogears/ticket/172>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Tickets" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears-tickets
-~----------~----~----~----~------~----~------~--~---

Reply via email to