Пример #1
0
char* getPathMonitorAux()  {
	char* cwd = getCWDPath();

	char* monitorAuxPath;
	if((monitorAuxPath = malloc(strlen(cwd)+1)) != NULL) {
		monitorAuxPath[0] = '\0';	// ensures the memory is an empty string
		strcat(monitorAuxPath, cwd);
		strcat(monitorAuxPath, "/monitorAux");
	} 

	return monitorAuxPath;
}
Пример #2
0
char* getFileMonitorPath() {
	char* cwd = getCWDPath();

	char* monitorAuxPath;
	if((monitorAuxPath = malloc(strlen(cwd)+1)) != NULL) {
		monitorAuxPath[0] = '\0';	// ensures the memory is an empty string
		strcat(monitorAuxPath, cwd);
		strcat(monitorAuxPath, "/fileMonitor");
	} else {
		printf("malloc failed!\n");
		exit(-1);
	}

	return monitorAuxPath;
}