A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge 'master' into mc
[simgrid.git]
/
teshsuite
/
msg
/
pid.c
diff --git
a/teshsuite/msg/pid.c
b/teshsuite/msg/pid.c
index
ef21c78
..
6d8c14c
100644
(file)
--- a/
teshsuite/msg/pid.c
+++ b/
teshsuite/msg/pid.c
@@
-1,4
+1,4
@@
-/* Copyright (c) 2009
, 2010
. The SimGrid Team.
+/* Copyright (c) 2009
-2010, 2013-2014
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
@@
-36,7
+36,8
@@
static int killall(int argc, char *argv[]){
int i;
for (i=0; i<3;i++) {
res = MSG_task_receive(&(task), mailbox);
int i;
for (i=0; i<3;i++) {
res = MSG_task_receive(&(task), mailbox);
- int pid = *((int*)MSG_task_get_data(task));
+ int pid = *(int*)MSG_task_get_data(task);
+ MSG_task_destroy(task);
XBT_INFO("Killing process \"%d\".", pid);
MSG_process_kill(MSG_process_from_PID(pid));
task = NULL;
XBT_INFO("Killing process \"%d\".", pid);
MSG_process_kill(MSG_process_from_PID(pid));
task = NULL;
@@
-55,10
+56,10
@@
int main(int argc, char *argv[])
MSG_function_register("sendpid", &sendpid);
MSG_function_register("killall", &killall);
MSG_function_register("sendpid", &sendpid);
MSG_function_register("killall", &killall);
- MSG_process_killall(atoi(argv[
2
]));
+ MSG_process_killall(atoi(argv[
3
]));
MSG_create_environment(argv[1]);
MSG_create_environment(argv[1]);
- MSG_launch_application(argv[
1
]);
+ MSG_launch_application(argv[
2
]);
res = MSG_main();
if (res == MSG_OK)
res = MSG_main();
if (res == MSG_OK)