Update of /cvsroot/freevo/freevo
In directory sc8-pr-cvs1:/tmp/cvs-serv1789

Modified Files:
        freevo 
Log Message:
fix uid storage for execute and runapp calls

Index: freevo
===================================================================
RCS file: /cvsroot/freevo/freevo/freevo,v
retrieving revision 1.105
retrieving revision 1.106
diff -C2 -d -r1.105 -r1.106
*** freevo      10 Jan 2004 16:53:48 -0000      1.105
--- freevo      10 Jan 2004 18:24:17 -0000      1.106
***************
*** 12,15 ****
--- 12,18 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.106  2004/01/10 18:24:17  dischi
+ # fix uid storage for execute and runapp calls
+ #
  # Revision 1.105  2004/01/10 16:53:48  dischi
  # better shutdown
***************
*** 212,216 ****
  
  
! def start(name, arg, bg):
      """
      start a process
--- 215,219 ----
  
  
! def start(name, arg, bg, store=True):
      """
      start a process
***************
*** 218,228 ****
      uid = os.fork()
      if uid:
!         try:
!             f = open('/var/run/' + name, 'w')
!         except (OSError, IOError):
!             f = open('/tmp/' + name + '%s-.pid' % os.getuid(), 'w')
  
!         f.write(str(uid)+'\n')
!         f.close()
  
          if not bg:
--- 221,232 ----
      uid = os.fork()
      if uid:
!         if store:
!             try:
!                 f = open('/var/run/' + name, 'w')
!             except (OSError, IOError):
!                 f = open('/tmp/' + name + '%s-.pid' % os.getuid(), 'w')
  
!             f.write(str(uid)+'\n')
!             f.close()
  
          if not bg:
***************
*** 235,239 ****
                  except KeyboardInterrupt:
                      pass
!                 if os.path.isfile(f.name):
                      os.unlink(f.name)
      else:
--- 239,243 ----
                  except KeyboardInterrupt:
                      pass
!                 if store and os.path.isfile(f.name):
                      os.unlink(f.name)
      else:
***************
*** 312,318 ****
  
  # now check what and how we should start freevo
! bg   = 0 # start in background
! proc = [ os.path.abspath(os.path.join(freevo_python, 'main.py')) ]
! name = os.path.splitext(os.path.basename(freevo_script))[0]
  
  if len(sys.argv) > 1:
--- 316,323 ----
  
  # now check what and how we should start freevo
! bg    = 0 # start in background
! proc  = [ os.path.abspath(os.path.join(freevo_python, 'main.py')) ]
! name  = os.path.splitext(os.path.basename(freevo_script))[0]
! check = True # check running instance
  
  if len(sys.argv) > 1:
***************
*** 354,359 ****
  elif arg == 'execute':
      # execute a python script
!     proc = sys.argv[2:]
! 
  
  elif arg == 'setup':
--- 359,364 ----
  elif arg == 'execute':
      # execute a python script
!     proc  = sys.argv[2:]
!     check = False
  
  elif arg == 'setup':
***************
*** 372,376 ****
      python[-1] = sys.argv[2]
      proc       = sys.argv[3:]
! 
  
  elif arg and not arg.startswith('-'):
--- 377,381 ----
      python[-1] = sys.argv[2]
      proc       = sys.argv[3:]
!     check      = False
  
  elif arg and not arg.startswith('-'):
***************
*** 411,415 ****
          sys.exit(1)
  
! if getpid(name, python + proc)[1]:
      if name != 'freevo':
          print '%s still running, run \'freevo %s stop\' to stop' % (name, name)
--- 416,420 ----
          sys.exit(1)
  
! if getpid(name, python + proc)[1] and check:
      if name != 'freevo':
          print '%s still running, run \'freevo %s stop\' to stop' % (name, name)
***************
*** 421,423 ****
      python = [ python[0] , '-OO' ] + python[1:]
  
! start(name, python + proc , bg)
--- 426,428 ----
      python = [ python[0] , '-OO' ] + python[1:]
  
! start(name, python + proc , bg, check)




-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to