forked from ggml-org/llama.cpp
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
main: rejig control token descriptor handling
- Loading branch information
Showing
1 changed file
with
11 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You want to fflush before the write to the control fd, not before the fprintfs to stdout. fflush will cause the stdout buffer to be written out to the kernel, which will ensure that the write call will go in the right place.
Basically think of the control tokens as acting like
std::endl
if you're familiar with that.