From: Samuel Lepetit Date: Fri, 27 Apr 2012 09:08:36 +0000 (+0200) Subject: Merge branch 'master' of git://scm.gforge.inria.fr/simgrid/simgrid-java X-Git-Tag: v3_9_90~569^2~19^2~124 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/2d035d48dbc4631b06a85a91b24b2115cd5bbe9b?hp=56faf26bbffd2c4d47feb3107808dea8195a90de Merge branch 'master' of git://scm.gforge.inria.fr/simgrid/simgrid-java --- diff --git a/ChangeLog b/ChangeLog index 3fde49ac75..ef7fd9f919 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,5 @@ SimGrid-java (3.6.1) unstable; urgency=low + * Make Process.kill(process) an instance method, not a static one * Fix a bug around Process.kill() * Add dsend and simulatedSleep to the bindings. diff --git a/examples/master_slave_kill/Master.java b/examples/master_slave_kill/Master.java index e3dc16e2e1..0600913cb7 100644 --- a/examples/master_slave_kill/Master.java +++ b/examples/master_slave_kill/Master.java @@ -41,7 +41,7 @@ public class Master extends Process { } } - Process.kill(process2); + process2.kill(); Msg.info("Process2 is now killed, should exit now"); } diff --git a/org/simgrid/msg/Process.java b/org/simgrid/msg/Process.java index bae4db2109..0f513d10c2 100644 --- a/org/simgrid/msg/Process.java +++ b/org/simgrid/msg/Process.java @@ -244,23 +244,11 @@ public abstract class Process extends Thread { * @param process the process to be killed. * */ - public static void kill(Process process) { - process.nativeStop(); - Msg.info("Process " + process.msgName() + " will be killed."); + public void kill() { + nativeStop(); + Msg.info("Process " + msgName() + " will be killed."); } - /** - * This method adds an argument in the list of the arguments of the main function - * of the process. - * - * @param arg The argument to add. - * - * @deprecated - */ - @Deprecated - protected void addArg(String arg) { - args.add(arg); - } /** * Suspends the process by suspending the task on which it was