bug-classpath
[Top][All Lists]
Advanced

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

[Bug classpath/27213] New: Bug in Runtime.exit preventing multiple calls


From: hagar at jnode dot org
Subject: [Bug classpath/27213] New: Bug in Runtime.exit preventing multiple calls from exiting
Date: 19 Apr 2006 10:17:07 -0000

In JNode we made/makes calls System.exit, but a second call to trapped the call
in a loop for ever. I found the problem in the java.lang.Runtime.exit call.
Attached is a diff.

199,210c199,214
<     while (true)
<       try
<         {
<           exitSequence.join();
<         }
<       catch (InterruptedException e)
<         {
<           // Ignore, we've suspended indefinitely to let all shutdown
<           // hooks complete, and to let any non-zero exits through, because
<           // this is a duplicate call to exit(0).
<         }
<   }
---
>       while (shutdownHooks != null)
>       {
>         try
>           {
>             exitSequence.join();
>           }
>         catch (InterruptedException e)
>           {
>             // Ignore, we've suspended indefinitely to let all shutdown
>             // hooks complete, and to let any non-zero exits through, because
>             // this is a duplicate call to exit(0).
>           }
>       }
>
>       halt(status);
>     }
242,243c246,247
<           }
<       }
---
>                       }
>               }
273,276c277,280
<                         synchronized (libpath)
<                           {
<                             shutdownHooks.remove(hooks[i]);
<                           }
---
>                     synchronized (libpath)
>                       {
>                         shutdownHooks.remove(hooks[i]);
>                       }
291a296,300
>
>         synchronized (libpath)
>           {
>             exitSequence = null;
>           }


-- 
           Summary: Bug in Runtime.exit preventing multiple calls from
                    exiting
           Product: classpath
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: classpath
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hagar at jnode dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27213





reply via email to

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