Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(457)

Issue 11238057: Change Process.kill to return a boolean instead of throwing an exception when kill fails. (Closed)

Created:
8 years, 2 months ago by Mads Ager (google)
Modified:
8 years, 2 months ago
Reviewers:
ahe, Søren Gjesse
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Change Process.kill to return a boolean instead of throwing an exception when kill fails. If the program wants to kill the process after a given time, it is possible that the process is already dead but has not yet been reaped. Therefore, there is no way for the programmer to test if the process is already dead before killing it. Throwing an exception from kill is not helpful as you will most often have to catch it and do nothing because you cannot prevent the exception occasionally and there is nothing you can do as a result of the exception since it usually means that the process is already dead. R=ahe@google.com,sgjesse@google.com BUG= Committed: https://code.google.com/p/dart/source/detail?r=13956

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -20 lines) Patch
M runtime/bin/process.dart View 1 chunk +8 lines, -3 lines 0 comments Download
M runtime/bin/process_impl.dart View 1 chunk +3 lines, -4 lines 0 comments Download
M runtime/bin/process_linux.cc View 1 chunk +1 line, -5 lines 0 comments Download
M runtime/bin/process_macos.cc View 1 chunk +1 line, -5 lines 0 comments Download
M runtime/bin/process_win.cc View 1 chunk +2 lines, -3 lines 0 comments Download
A tests/standalone/io/process_kill_test.dart View 1 chunk +26 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Mads Ager (google)
8 years, 2 months ago (2012-10-23 08:59:44 UTC) #1
Søren Gjesse
8 years, 2 months ago (2012-10-23 09:17:26 UTC) #2
lgtm

Powered by Google App Engine
This is Rietveld 408576698