patchrdiff-backup - Patches: patch #5726, Patch for pid_exist() function in...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #5726: Patch for pid_exist() function in regress.py

Submitted by:  Sébastien Maret <bmaret>
Submitted on:  Mon 05 Feb 2007 08:37:13 PM UTC  
 
Category:  None Priority:  5 - Normal
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Closed

Tue 06 Mar 2007 07:00:16 PM UTC, comment #2: 

committed, thanks

dean gaudet <dgaudet>
Project Administrator
Tue 06 Mar 2007 02:57:14 PM UTC, comment #1: 

Sending a SIGCONT is indeed not a good idea. The code should send a signal 0 instead. A new patch is attached. This works fine for me.

(file #12126)

Sébastien Maret <bmaret>
Mon 05 Feb 2007 08:37:13 PM UTC, original submission:  

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.

Sébastien Maret <bmaret>

 

Attached Files
file #12126:  pid_running.patch added by bmaret (920B - application/octet-stream)
file #11925:  pid_running.patch added by bmaret (873B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by dgaudet (Posted a comment)
  • -email is unavailable- added by bmaret (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-03-06 dgaudet Open/ClosedOpen => Closed
    2007-03-06 bmaret Attached File- => Added pid_running.patch, #12126
    2007-02-05 bmaret Attached File- => Added pid_running.patch, #11925

    Back to the top


    Powered by Savane 3.5