-
- DEBUG3("Process %s(%s) will be started at time %f", arg->name,
- arg->hostname,start_time);
- if (simix_global->create_process_function)
- surf_timer_resource->extension_public->set(start_time, (void*) simix_global->create_process_function, arg);
- else
- surf_timer_resource->extension_public->set(start_time, (void*) &SIMIX_process_create_with_arguments, arg);
-
- }
- if((start_time<0) || (start_time==SIMIX_get_clock())) {
- DEBUG2("Starting Process %s(%s) right now", parse_argv[0], parse_host);
-
- if (simix_global->create_process_function)
- process = simix_global->create_process_function(parse_argv[0], parse_code, NULL, parse_host, parse_argc,parse_argv);
- else
- process = SIMIX_process_create_with_arguments(parse_argv[0], parse_code, NULL, parse_host, parse_argc,parse_argv, NULL);
-
- if(kill_time > SIMIX_get_clock()) {
- if (simix_global->kill_process_function)
- surf_timer_resource->extension_public->set(start_time, (void*) simix_global->kill_process_function, arg);
- else
- surf_timer_resource->extension_public->set(kill_time, (void*) &SIMIX_process_kill, (void*) process);
- }
- xbt_free(parse_host);
+ arg->properties = current_property_set;
+
+ XBT_DEBUG("Process %s(%s) will be started at time %f", arg->name,
+ arg->hostname, start_time);
+ SIMIX_timer_set(start_time, &SIMIX_process_create_from_wrapper, arg);
+ } else { // start_time <= SIMIX_get_clock()
+ XBT_DEBUG("Starting Process %s(%s) right now", process->argv[0], sg_host_name(host));
+
+ if (simix_global->create_process_function)
+ simix_global->create_process_function(&process_created,
+ (char*)(process->argv)[0],
+ parse_code,
+ NULL,
+ sg_host_name(host),
+ kill_time,
+ process->argc,
+ (char**)(process->argv),
+ current_property_set,
+ auto_restart);
+ else
+ simcall_process_create(&process_created, (char*)(process->argv)[0], parse_code, NULL, sg_host_name(host), kill_time, process->argc,
+ (char**)process->argv, current_property_set,auto_restart);
+
+ /* verify if process has been created (won't be the case if the host is currently dead, but that's fine) */
+ if (!process_created) {
+ return;
+ }