1 /* Copyright (c) 2006-2014. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
8 import org.simgrid.msg.Msg;
9 import org.simgrid.msg.Process;
10 import org.simgrid.msg.MsgException;
11 import org.simgrid.msg.HostNotFoundException;
13 import process.kill.Victim;
15 public class Killer extends Process {
16 public Killer(String hostname, String name) throws HostNotFoundException {
17 super(hostname, name);
19 public void main(String[] args) throws MsgException {
20 Victim poorVictim = null;
23 poorVictim = new Victim("Boivin","victim");
25 } catch (MsgException e){
27 Msg.error("Cannot create the victim process!");
31 Msg.info("Resume Process");
34 Msg.info("Kill Process");
37 Msg.info("Ok, goodbye now.");
38 // The actor can also commit a suicide with the following command
39 exit(); // This will forcefully stop the current actor
40 // Of course, it's not useful here at the end of the main function, but that's for the example (and to check that this still works in the automated tests)