[Labs-l] Tools: Issues with temporary files and the Peachy framework

Tim Landscheidt tim at tim-landscheidt.de
Wed Jul 9 22:19:49 UTC 2014


Petr Bena <benapetr at gmail.com> wrote:

> [...]
> @Yuvi nope, you can delete open files on unix, they will be deleted when
> last hard link is gone (fd creates hl as well) if some application crash
> because of that it was poorly written and was supposed to die :P

> [...]

The deletion is not the problem.  Imagine an application
that creates a SQLite database /tmp/app-state.sqlite.  If
you now mount another filesystem on /tmp, the processes/
threads that opened the file before the mount see the old
database, while processes/threads trying to open the file
after the mount either fail or create a new database.

The only time you can move essential directories like /tmp
around is during a reboot.

Tim




More information about the Labs-l mailing list