#include "support/types.h"
#include "support/FileZipListDir.h"
-#if !defined (HAVE_FORK)
-# define fork() -1
-#endif
-
#include <boost/bind.hpp>
#include <boost/shared_ptr.hpp>
if (!tmp_ret.empty()) {
buffer_.writeFile(tmp_ret);
// assume successful write of tmp_ret
- if (!tmp_ret.moveTo(fname_)) {
+ if (!tmp_ret.moveTo(fname_))
failed = true;
- // most likely couldn't move between
- // filesystems unless write of tmp_ret
- // failed so remove tmp file (if it
- // exists)
- tmp_ret.removeFile();
- }
- } else {
+ } else
failed = true;
- }
if (failed) {
// failed to write/rename tmp_ret so try writing direct
buffer_.message(_("Autosave failed!"));
}
}
- if (pid == 0) { // we are the child so...
+ if (pid == 0) // we are the child so...
_exit(0);
- }
}
return pid;
}