#1460 Problem with the kill builtin in MSYS bash

closed-fixed
MSYS (75)
2010-08-13
2010-08-10
Peter Rosin
No

Hi!

I found an automake test that didn't behave properly (cont5.test). It
had a success rate of about 50% for me on MSYS. I have reduced it to
the attached simple test case, which fails much more often than the
original code.

I.e. start a process in the background, check if it is alive with
kill -0 (which it should be), and report failure if it isn't. But it
appears that kill fails if it is executed too soon after the new
process was created...

Now, I know that I'm not personally up to date, but someone
else stated that it also happens with up to date software.

$ sh --version
GNU bash, version 3.1.0(1)-release (i686-pc-msys)
Copyright (C) 2005 Free Software Foundation, Inc.

$ uname -a
MINGW32_NT-5.1 PEDA-PC 1.0.11(0.46/3/2) 2009-07-11 17:46 i686 Msys

Discussion

  • Peter Rosin

    Peter Rosin - 2010-08-10

    killtest, a small test case

     
  • Cesar Strauss

    Cesar Strauss - 2010-08-10

    Thanks for the report and test case. I can reproduce it every time.

    I believe I have found and fixed a race condition when determining if a process is open.

    Please try copying the following file over your existing msys-1.0.dll:

    http://prdownloads.sourceforge.net/mingw/msys-1.0.dll.20100810?download

    Does it solve the issue for you?

    Regards,
    Cesar

     
  • Cesar Strauss

    Cesar Strauss - 2010-08-10
    • assigned_to: nobody --> cstrauss
    • status: open --> pending
     
  • Peter Rosin

    Peter Rosin - 2010-08-11
    • status: pending --> open
     
  • Peter Rosin

    Peter Rosin - 2010-08-11

    Hi Cesar,

    Yes, with this dll it works just fine for me, thanks!

    while :; do ./killtest; done

    produces a long line of successes.

    Cheers,
    Peter

     
  • Cesar Strauss

    Cesar Strauss - 2010-08-13

    Thanks for the confirmation. The fix is now in CVS and will be present in the next release.

    Cheers,
    Cesar

     
  • Cesar Strauss

    Cesar Strauss - 2010-08-13
    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks