]> git.ipfire.org Git - people/ms/pakfire.git/commit - tests/libpakfire/jail.c
jail: Avoid deadlock when sending data to stdin
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 15 Dec 2022 16:41:12 +0000 (16:41 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 15 Dec 2022 16:41:12 +0000 (16:41 +0000)
commit06b864ae930adc8eb6fba5317830a7a10e817969
tree711711768aa17ed28060cd4636d0cb0df549c599
parent70fa1e8af8e63efb1383d9069034cb50c9609fe5
jail: Avoid deadlock when sending data to stdin

It could happen that we filled up the buffer the input pipe and the jail
communication got deadlocked.

This is now being solved by using the event loop to find out when we are
ready to send more data. This required some changes into how the
callbacks behave.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/build.c
src/libpakfire/jail.c
tests/libpakfire/jail.c
tests/stub/command.c