- arg-> kill_time = kill_time;
-
- DEBUG3("Process %s(%s) will be started at time %f", arg->name,
- arg->host->name,start_time);
- 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->name);
- process = SIMIX_process_create_with_arguments(parse_argv[0], parse_code,
- NULL, parse_host,
- parse_argc,parse_argv);
- if(kill_time > SIMIX_get_clock()) {
- surf_timer_resource->extension_public->set(kill_time,
- (void*) &SIMIX_process_kill,
- (void*) process);
+ arg->kill_time = kill_time;
+ arg->properties = current_property_set;
+
+ DEBUG3("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()
+ 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,
+ /*the props */
+ current_property_set);
+ else
+ process = SIMIX_process_create(parse_argv[0], parse_code, NULL, parse_host, parse_argc, parse_argv, /*the props */
+ current_property_set);
+ /* verify if process has been created (won't be the case if the host is currently dead, but that's fine) */
+ if (!process) {
+ xbt_free(parse_host);
+ return;
+ }
+ if (kill_time > SIMIX_get_clock()) {
+ if (simix_global->kill_process_function)
+ SIMIX_timer_set(start_time, simix_global->kill_process_function, process);
+ else
+ SIMIX_timer_set(start_time, &SIMIX_process_kill, process);