mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-21 23:38:49 -05:00
run_chroot: always clear script output buffer
If the script output does not end in a newline there could still be data in the buffer after the poll loop. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
34bbe4cf7b
commit
dfa4dcb16d
@ -681,6 +681,12 @@ int _alpm_run_chroot(alpm_handle_t *handle, const char *cmd, char *const argv[],
|
||||
STOP_POLLING(parent2child);
|
||||
}
|
||||
}
|
||||
/* process anything left in the input buffer */
|
||||
if(ilen) {
|
||||
/* buffer would have already been flushed if it had a newline */
|
||||
strcpy(ibuf + ilen, "\n");
|
||||
_alpm_chroot_process_output(handle, ibuf);
|
||||
}
|
||||
|
||||
#undef STOP_POLLING
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user