write_nointr takes a const char* buffer