On Sun, Dec 10, 2023 at 5:41 PM Jason E. Aten <j.e.a...@gmail.com> wrote:
> My question is: is there a way to have the Go process detect if the file it > is writing to has been deleted by another process (git in this case) so that > attempting to append to the file is no longer effective? It is effective and [most] operations on the file continue to work as usual. "Removing" a file, like in `os.Remove` is just removing one reference to it. Only when the reference count drops to zero is the file deleted. This is, AFAIK, how nixes work and it's IMO actually a neat feature. It enables, for example, updating files without disrupting processes that have those files opened. Less advanced operating systems, to achieve the same effect, have to reboot etc. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAA40n-VZDOdwMOqqmAc-RgpGyNkOi0LvyFR%2BKbzem4PqNNwrYQ%40mail.gmail.com.