]> granicus.if.org Git - file/commit
From Denys Vlasenko:
authorChristos Zoulas <christos@zoulas.com>
Sun, 5 May 2019 19:22:36 +0000 (19:22 +0000)
committerChristos Zoulas <christos@zoulas.com>
Sun, 5 May 2019 19:22:36 +0000 (19:22 +0000)
commit5aa2f96e6db028c84dd53ba10f2c0c4a35e708d2
treec8287d5bc83304f80f18091746029719a8ddf5a9
parent07009b22623fc7e702a077167f4e99a2b82db245
From Denys Vlasenko:

This makes more clear what fds are closed when, when you read
caller function code.

This is a preparation to not clobber fdp[] in the child, so that
we can switch to using vfork() in a later patch.

Add ///BUG comments:
(*) we wait() in writechild, thus, if write() in writing child blocks
waiting for decompressor to consume data, and decompressor blocks waiting
ofr _us_ to read its data, we would deadlock.
(*) we can't know that the child we spawned is the only running child
of the process. We should use waitpid() to wait specifically for
the child we need.

Will fix in patch 4.
src/compress.c