[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Rdiff-backup-bugs] [patch #5726] Patch for pid_exist() function in regr

From: Sébastien Maret
Subject: [Rdiff-backup-bugs] [patch #5726] Patch for pid_exist() function in regress.py
Date: Mon, 05 Feb 2007 20:37:14 +0000
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en) AppleWebKit/418.9.1 (KHTML, like Gecko) Safari/419.3


                 Summary: Patch for pid_exist() function in regress.py
                 Project: rdiff-backup
            Submitted by: bmaret
            Submitted on: Monday 02/05/2007 at 20:37
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any



I think that there is a bug in pid_running() in regress.py. On my system,
os.kill(pid, signal.NSIG) always produces an exception, whether or not
the pid exists:

% python
Python 2.4.3 (#1, Oct 12 2006, 16:06:07)
[GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import os, signal    
>>> os.kill(123, signal.NSIG)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
OSError: [Errno 22] Invalid argument

so pid_running() always returns 1. I think that this function should
send a SIGCONT instead. If the process does not exists, this gives:

>> os.kill(123, signal.SIGCONT)
>>> os.kill(123, signal.SIGCONT)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
OSError: [Errno 3] No such process

while if it exists, it does nothing.

The attached patch corrects this bug.


File Attachments:

Date: Monday 02/05/2007 at 20:37  Name: pid_running.patch  Size: 873B   By:



Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]