removed a few references to TEMP or TMP. need a major overhaul to refer to TMP
uniformly.
possible by using the current separator and assignment characters.
E.G.: if the separator is ';' and the assignment character
is '=', then one's string would look something like: @code
possible by using the current separator and assignment characters.
E.G.: if the separator is ';' and the assignment character
is '=', then one's string would look something like: @code
- TEMP=c:\tmp; GLOB=c:\glob.exe; .... @endcode
+ state_folder=/home/fred/state; GLOB=/usr/bin/glob.exe; .... @endcode
whitespace is ignored if it's found (1) after a separator and before
the next variable name, (2) after the variable name and before the
assignment character, (3) after the assignment character and before the
whitespace is ignored if it's found (1) after a separator and before
the next variable name, (2) after the variable name and before the
assignment character, (3) after the assignment character and before the
-#define CLOSE_TMP_FILE { \
+#define CLOSE_TEMPORARY_FILE { \
/* continuable_error("process_control", "get_processes_with_ps", error); */ \
if (output) { \
fclose(output); \
/* continuable_error("process_control", "get_processes_with_ps", error); */ \
if (output) { \
fclose(output); \
int sysret = system(cmd.s());
if (negative(sysret)) {
LOG("got negative return from system()!");
int sysret = system(cmd.s());
if (negative(sysret)) {
LOG("got negative return from system()!");
return false;
}
output = fopen(tmpfile.s(), "r");
if (!output) {
LOG("failed to open process list file!");
return false;
}
output = fopen(tmpfile.s(), "r");
if (!output) {
LOG("failed to open process list file!");
return false;
}
const int max_buff = 10000;
return false;
}
const int max_buff = 10000;
if (size_read > 0)
accumulator += astring(astring::UNTERMINATED, buff, size_read);
}
if (size_read > 0)
accumulator += astring(astring::UNTERMINATED, buff, size_read);
}
// parse the string up now.
bool first_line = true;
while (accumulator.length()) {
// parse the string up now.
bool first_line = true;
while (accumulator.length()) {
filename::detooth_filename(clean_name);
// make sure our target directory exists.
filename::detooth_filename(clean_name);
// make sure our target directory exists.
- // this choice is only user specific.
-// astring tmp_dir = portable::env_string("TMP") + "/rendezvous";
-
- // this choice uses a system-wide location.
+ // use a system-wide location for rendezvous state files.
astring tmp_dir = "/tmp/rendezvous";
mkdir(tmp_dir.observe(), 0777);
astring tmp_dir = "/tmp/rendezvous";
mkdir(tmp_dir.observe(), 0777);
if [[ $unpack_file =~ .*\.tar$ \
|| $unpack_file =~ .*\.tar\.gz$ \
|| $unpack_file =~ .*\.tar\.bz2$ \
if [[ $unpack_file =~ .*\.tar$ \
|| $unpack_file =~ .*\.tar\.gz$ \
|| $unpack_file =~ .*\.tar\.bz2$ \
- || $unpack_file =~ .*\.tgz$ ]]; then
+ || $unpack_file =~ .*\.iar$ \
+ || $unpack_file =~ .*\.oar$ \
+ || $unpack_file =~ .*\.tgz$ \
+ ]]; then
tar -xf $unpack_file &>/dev/null
elif [[ $unpack_file =~ .*\.zip$ \
|| $unpack_file =~ .*\.odt$ \
|| $unpack_file =~ .*\.jar$ \
tar -xf $unpack_file &>/dev/null
elif [[ $unpack_file =~ .*\.zip$ \
|| $unpack_file =~ .*\.odt$ \
|| $unpack_file =~ .*\.jar$ \
- || $unpack_file =~ .*\.iar$ \
- || $unpack_file =~ .*\.oar$ ]]; then
+ || $unpack_file =~ .*\.war$ \
+ ]]; then
unzip $unpack_file &>/dev/null
fi
save_err=$?
unzip $unpack_file &>/dev/null
fi
save_err=$?