I'm not really sure what you're trying to do - the example appears to start vim 
on a file and then wait for it to exit, with nothing else happening. Are you 
interacting with vim manually in the meantime?

Regardless, I bet the issue is that vim does not save the data to the same file 
- it saves to a temp file and then atomically renames it over the original. 
This means your fd is referring to the old file that is now unlinked, and not 
the new contents.

//jb


> On 21 Aug 2017, at 06:50, Alexandru Bonini <boninialexan...@gmail.com> wrote:
> 
> https://play.golang.org/p/_rudr2_Vyc
> 
> I don't understand why any change done via vim is not reflected by b.String().
> I can see the changes in the tempfile.
> Any help is appreciated.
> 
> -- 
> 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.
> For more options, visit https://groups.google.com/d/optout.

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to