${CMAKE_CURRENT_SOURCE_DIR}/get_sender.xml
${CMAKE_CURRENT_SOURCE_DIR}/get_sender_d.xml
${CMAKE_CURRENT_SOURCE_DIR}/get_sender_p.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/pid.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/pid_d.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/pid_p.xml
PARENT_SCOPE
)
set(teshsuite_src
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;
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_launch_application(argv[1]);
+ MSG_launch_application(argv[2]);
res = MSG_main();
if (res == MSG_OK)
-$ msg/pid ${srcdir:=.}/msg/pid.xml 0 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ msg/pid ${srcdir:=.}/msg/pid_p.xml ${srcdir:=.}/msg/pid_d.xml 0 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
> [ 0.000000] (1:sendpid@toto) Sending pid of "1".
> [ 0.000000] (2:sendpid@toto) Sending pid of "2".
> [ 0.000000] (3:sendpid@toto) Sending pid of "3".
> [ 0.003247] (4:killall@toto) Killing process "3".
> [ 0.003247] (3:sendpid@toto) Process "3" killed.
-$ msg/pid ${srcdir:=.}/msg/pid.xml 2 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ msg/pid ${srcdir:=.}/msg/pid_p.xml ${srcdir:=.}/msg/pid_d.xml 2 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
> [ 0.000000] (2:sendpid@toto) Sending pid of "2".
> [ 0.000000] (3:sendpid@toto) Sending pid of "3".
> [ 0.000000] (4:sendpid@toto) Sending pid of "4".
<?xml version='1.0'?>
<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
<platform version="3">
- <!-- Platform -->
- <AS id="AS0" routing="Full">
- <host id="toto" power="1000000"/>
- <link id="lb" bandwidth="100000000" latency="0.000000"/>
- <route src="toto" dst="toto"><link_ctn id="lb"/></route>
- </AS>
-
<!-- Deployment -->
<process host="toto" function="sendpid"/>
<process host="toto" function="sendpid"/>
<process host="toto" function="sendpid"/>
<process host="toto" function="killall"/>
-
</platform>
--- /dev/null
+<?xml version='1.0'?>
+ <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+ <platform version="3">
+ <!-- Platform -->
+ <AS id="AS0" routing="Full">
+ <host id="toto" power="1000000"/>
+ <link id="lb" bandwidth="100000000" latency="0.000000"/>
+ <route src="toto" dst="toto"><link_ctn id="lb"/></route>
+ </AS>
+ </platform>