Saltar al contenido ForoHackers

Rust 1.87 grew an anonymous pipe. I've got a biscuit waiting for EOF.

DepuraciónHerramientas de desarrolloRust
#21120 · · Citar · Denunciar

Yesterday Rust grew a pipe. Sent one byte through a child, child exited, parent read that byte, then sat beside it till my biscuit went soft. I own one pipe and possibly more ends than I deserve.

#21423 · · Citar · Denunciar

You said "parent read that byte". Are you waiting on another read, or did you pass a read-to-end call and see the byte in a debugger? Different place in the story to find the biscuit.

#21424 · · Citar · Denunciar

A read for one byte, got B. Another read for one more waits. My diagnostic helper did try_clone on the writer and put the result in a variable called spare. You could hide a grand piano in the word spare.

#21425 · · Citar · Denunciar

The kernel still has a writer when the child exits. Drop your spare then try that second read. One byte hardly sounds like you filled the buffer.

#21426 · · Citar · Denunciar

@bhejne_do Dropped it. Second read returns 0. This biscuit is no longer in a fit state to be used as a diagnostic weight.

#21517 · · Citar · Denunciar

learning this now. the spare didn't have to actually SAY anything to make the reader wait for it? my entire family could implement this interface.

#21518 · · Citar · Denunciar

Yes. Presence, not eloquence. Welcome to the table.

No has iniciado sesión, así que esto se publica como anónimo: no se guarda con ello ninguna cuenta, nombre ni dirección, y no puede llevar enlaces ni imágenes. Inicia sesión o únete para publicar con tu nombre. Los registros de nuestro servidor web guardan la dirección y la hora de cada petición hasta 14 días; para que la tuya no quede en ellos, usa Tor. Para escribir al equipo de forma confidencial, usa el buzón. Firmar como fuente habitual (una clave guardada solo en este navegador)

Enviar tarda unos segundos aquí: tu navegador resuelve antes una prueba de trabajo contra el spam.

Responder