James M Snell
6c84c341bd
stream: fix Utf8Stream flush handling
...
Fix several issues with `Utf8Stream` flushing:
* `flush()` now writes buffered data regardless of `minLength`
and invokes the callback only after pending writes complete,
including when `minLength` is zero and a write is in flight.
* Multiple concurrent `flush()` calls are tracked correctly and
`end()` waits for pending flushes before closing.
* `flushSync()` throws `ERR_INVALID_STATE` if called while an
asynchronous write is in progress instead of corrupting output.
* Periodic flushes no longer stack up while a flush is pending.
* `fsync` is skipped for stdout/stderr file descriptors.
* `reopen()`, `end()` and `destroy()` behave correctly when the
stream is destroyed while still opening.
Signed-off-by: James M Snell <jasnell@gmail.com >
Assisted-by: Opencode
PR-URL: https://github.com/nodejs/node/pull/66473
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2026-10-10 11:21:51 +00:00
..
2026-10-03 06:40:59 +00:00
2026-10-03 06:41:28 +00:00
2026-10-07 15:38:44 -03:00
2026-10-08 09:58:29 +00:00
2026-10-05 16:47:38 +00:00
2026-10-07 15:39:57 -03:00
2026-10-07 15:38:44 -03:00
2026-10-07 15:38:44 -03:00
2026-10-07 15:38:44 -03:00
2026-10-07 15:38:44 -03:00
2026-10-07 15:38:44 -03:00
2026-10-07 15:39:57 -03:00
2026-10-07 15:38:44 -03:00
2026-10-07 15:39:57 -03:00
2026-10-07 15:39:57 -03:00
2026-10-07 15:39:57 -03:00
2026-10-07 15:38:44 -03:00
2026-10-07 15:38:44 -03:00
2026-10-07 15:38:44 -03:00
2026-10-07 15:38:44 -03:00
2026-09-25 14:39:01 +00:00
2026-09-25 14:39:01 +00:00
2026-09-28 04:22:37 +00:00
2026-09-28 04:22:37 +00:00
2026-09-30 13:30:42 +00:00
2026-10-05 16:47:38 +00:00
2026-10-05 11:25:07 +00:00
2026-10-05 16:47:38 +00:00
2026-09-30 08:25:52 +00:00
2026-10-03 16:24:37 +00:00
2026-10-05 16:47:39 +00:00
2026-09-25 14:25:32 +00:00
2026-09-30 06:51:22 +00:00
2026-09-25 13:23:24 +00:00
2026-09-30 06:51:19 +00:00
2026-10-07 13:36:40 +00:00
2026-09-25 13:23:26 +00:00
2026-10-07 13:36:48 +00:00
2026-09-26 21:18:43 +00:00
2026-09-25 14:25:32 +00:00
2026-10-03 08:32:22 +00:00
2026-09-25 14:25:32 +00:00
2026-09-30 06:51:21 +00:00
2026-09-26 07:57:16 +00:00
2026-10-05 16:47:38 +00:00
2026-09-26 20:55:09 +00:00
2026-09-27 00:37:25 +02:00
2026-09-25 18:14:48 +02:00
2026-10-04 22:38:33 +02:00
2026-10-10 11:21:51 +00:00
2026-10-10 11:21:51 +00:00
2026-10-10 11:21:51 +00:00
2026-10-10 11:21:51 +00:00
2026-10-05 05:16:57 +00:00
2026-09-25 21:32:36 +02:00
2026-10-05 05:16:57 +00:00
2026-10-05 11:25:07 +00:00
2026-09-28 20:12:21 +00:00
2026-09-28 20:12:21 +00:00
2026-10-02 22:33:38 +00:00
2026-09-30 13:29:54 +00:00
2026-09-26 19:52:53 +00:00
2026-09-25 19:44:48 +00:00
2026-09-30 06:51:24 +00:00
2026-09-25 13:59:31 +00:00
2026-09-26 21:18:43 +00:00
2026-10-10 08:29:37 +00:00
2026-09-30 06:51:24 +00:00
2026-09-30 13:29:54 +00:00
2026-09-29 10:27:53 +00:00
2026-09-28 10:40:58 +00:00
2026-09-26 18:27:41 +00:00
2026-09-29 04:38:26 +00:00
2026-09-27 08:10:01 +00:00
2026-09-25 21:29:33 +00:00
2026-09-26 14:02:54 +00:00
2026-09-25 21:31:04 +02:00
2026-09-30 08:25:50 +00:00
2026-09-25 20:47:42 +00:00
2026-10-06 11:36:02 +00:00
2026-10-06 11:36:02 +00:00
2026-10-06 11:36:02 +00:00
2026-09-25 21:31:04 +02:00
2026-09-26 08:20:29 +00:00
2026-09-30 08:25:48 +00:00
2026-10-06 17:40:45 +00:00
2026-09-26 02:30:46 +00:00
2026-09-30 08:25:47 +00:00
2026-10-05 11:25:07 +00:00
2026-09-27 00:37:26 +02:00
2026-10-05 05:47:29 +00:00
2026-10-02 17:29:27 +00:00
2026-09-28 23:30:13 +00:00
2026-10-05 21:26:47 +00:00
2026-10-05 21:26:47 +00:00
2026-10-05 21:26:47 +00:00
2026-10-05 21:26:47 +00:00
2026-10-05 21:26:47 +00:00
2026-10-05 21:26:47 +00:00
2026-09-25 18:49:35 +00:00
2026-09-30 17:49:14 +00:00
2026-09-25 18:49:35 +00:00
2026-09-25 18:49:35 +00:00
2026-09-25 18:49:35 +00:00
2026-09-27 08:10:15 +00:00
2026-09-27 08:10:15 +00:00
2026-09-27 08:10:15 +00:00
2026-09-25 18:49:35 +00:00
2026-09-26 21:18:48 +00:00
2026-10-10 08:29:51 +00:00
2026-09-26 21:18:43 +00:00
2026-10-08 20:58:31 +00:00
2026-09-26 21:18:43 +00:00
2026-09-26 21:18:43 +00:00
2026-10-05 16:47:38 +00:00
2026-09-26 21:18:43 +00:00
2026-09-26 21:18:43 +00:00
2026-09-26 21:18:43 +00:00
2026-09-26 21:18:43 +00:00
2026-09-26 21:18:43 +00:00
2026-09-26 21:18:43 +00:00
2026-09-26 21:18:43 +00:00
2026-09-26 21:18:43 +00:00
2026-09-26 21:18:43 +00:00
2026-09-26 21:18:43 +00:00
2026-09-26 21:18:43 +00:00
2026-09-26 21:18:43 +00:00
2026-09-25 17:21:04 +00:00
2026-09-26 21:18:43 +00:00
2026-09-25 17:21:04 +00:00
2026-09-26 21:18:43 +00:00
2026-09-26 21:18:43 +00:00
2026-09-26 21:18:43 +00:00
2026-09-26 00:03:45 +00:00
2026-10-03 09:51:01 +00:00
2026-09-25 20:28:33 +00:00
2026-09-25 20:28:33 +00:00
2026-09-25 20:28:33 +00:00
2026-09-25 20:28:33 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-06 17:40:30 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-06 17:17:15 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-09-25 13:49:42 +00:00
2026-10-06 05:55:47 +00:00
2026-10-05 16:47:38 +00:00
2026-10-05 16:47:38 +00:00
2026-10-08 03:54:07 +00:00
2026-09-26 08:20:30 +00:00
2026-10-02 16:56:58 +00:00
2026-10-09 15:53:53 +00:00
2026-10-01 05:39:07 +00:00
2026-09-26 00:03:45 +00:00
2026-10-07 06:41:31 +00:00
2026-09-26 00:03:45 +00:00
2026-09-26 00:03:45 +00:00
2026-09-26 00:03:45 +00:00
2026-09-26 00:03:45 +00:00
2026-10-01 05:39:07 +00:00
2026-09-26 00:03:45 +00:00
2026-09-26 00:03:45 +00:00
2026-09-26 00:03:45 +00:00
2026-09-26 00:03:45 +00:00
2026-09-26 00:03:45 +00:00
2026-09-26 00:03:45 +00:00
2026-10-07 02:13:23 +00:00
2026-09-26 00:03:45 +00:00
2026-09-26 00:03:45 +00:00
2026-09-26 00:03:45 +00:00
2026-09-26 00:03:45 +00:00
2026-09-26 00:03:45 +00:00
2026-09-30 02:42:41 +00:00
2026-09-26 00:03:45 +00:00
2026-10-03 06:41:28 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:29 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:29 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-10-07 20:01:31 +00:00
2026-09-26 19:32:45 +00:00
2026-10-03 06:41:28 +00:00
2026-09-25 13:50:11 +00:00
2026-10-03 09:50:25 +00:00
2026-09-25 15:36:32 +00:00
2026-09-30 08:25:53 +00:00
2026-09-30 08:25:53 +00:00
2026-09-26 20:46:13 +00:00
2026-10-04 22:40:57 +02:00
2026-10-05 05:17:09 +00:00
2026-09-25 18:14:48 +02:00
2026-09-27 09:36:07 +00:00
2026-09-25 13:23:26 +00:00
2026-09-25 13:23:15 +00:00
2026-09-25 13:23:22 +00:00
2026-09-25 14:25:32 +00:00
2026-09-25 13:23:15 +00:00
2026-09-25 13:23:16 +00:00
2026-09-25 13:23:26 +00:00
2026-09-25 13:23:26 +00:00
2026-09-25 13:23:23 +00:00
2026-09-25 14:25:32 +00:00
2026-09-29 23:56:19 +00:00
2026-09-29 23:56:19 +00:00
2026-09-29 23:56:19 +00:00
2026-09-29 23:56:19 +00:00
2026-09-25 13:23:26 +00:00
2026-09-25 13:23:26 +00:00
2026-09-25 13:23:26 +00:00
2026-09-25 13:23:21 +00:00
2026-09-25 13:23:26 +00:00
2026-09-25 13:23:14 +00:00
2026-09-25 13:23:22 +00:00
2026-09-25 13:23:26 +00:00
2026-09-25 13:23:27 +00:00
2026-09-25 13:23:15 +00:00
2026-09-25 13:23:15 +00:00
2026-10-04 19:16:34 +00:00
2026-09-25 13:23:17 +00:00
2026-09-25 13:23:13 +00:00
2026-09-25 13:23:19 +00:00
2026-10-07 13:36:37 +00:00
2026-09-25 13:23:23 +00:00
2026-09-25 13:23:26 +00:00
2026-09-25 14:25:32 +00:00
2026-09-25 13:23:15 +00:00
2026-09-25 13:23:18 +00:00
2026-09-25 13:23:15 +00:00
2026-09-29 23:56:19 +00:00
2026-09-26 02:30:46 +00:00
2026-09-29 17:19:28 +00:00
2026-09-29 17:19:26 +00:00
2026-09-29 17:19:32 +00:00
2026-09-29 17:19:25 +00:00
2026-09-26 18:28:17 +00:00
2026-09-26 18:28:17 +00:00
2026-10-05 07:00:09 +00:00
2026-09-25 13:49:56 +00:00
2026-09-27 00:37:25 +02:00
2026-09-26 19:42:29 +00:00
2026-09-26 18:28:05 +00:00
2026-09-29 21:48:17 +00:00
2026-09-26 18:27:53 +00:00
2026-10-03 07:35:17 +00:00
2026-09-29 21:23:49 +00:00
2026-09-25 13:49:29 +00:00