git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@3790
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
linux ones too) [Mt]
* New function: gras_agent_spawn() to launch a new process on
current host. Only working in simulation for now.. [Mt]
+ * New function: gras_os_hostport() returning a constant form (ie,
+ not needing to be freed) of "gras_os_hostname():gras_os_myport()"
XBT:
* Make the backtrace of exceptions more human readable [Mt]
/** @brief returns the number on which this process is listening for incoming messages */
XBT_PUBLIC(int) gras_os_myport(void);
+/** @brief get the uri of the current process
+ *
+ * Returns the concatenation of gras_os_myname():gras_os_myport(). Please do not free the result.
+ */
+XBT_PUBLIC(const char *)
+gras_os_hostport(void);
+
/** @brief get process identification
*
* Returns the process ID of the current process. (This is often used
}
xbt_dynar_free( & _gras_procdata_fabrics );
}
+
+
+const char *gras_os_hostport() {
+ static char *res=NULL;
+ if (res)
+ free(res); /* my port may have changed */
+ res = bprintf("%s:%d",gras_os_myname(),gras_os_myport());
+ return (const char*)res;
+}