summaryrefslogtreecommitdiff
path: root/src/apk.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/apk.c')
-rw-r--r--src/apk.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/apk.c b/src/apk.c
index 3bf1154..0404831 100644
--- a/src/apk.c
+++ b/src/apk.c
@@ -48,6 +48,7 @@ static struct apk_option generic_options[] = {
{ 'f', "force", "Do what was asked even if it looks dangerous" },
{ 'U', "update-cache", "Update the repository cache" },
{ 0x101, "progress", "Show a progress bar" },
+ { 0x10f, "progress-fd", "Write progress to fd", required_argument, "FD" },
{ 0x110, "no-progress", "Disable progress bar even for TTYs" },
{ 0x102, "clean-protected", "Do not create .apk-new files to "
"configuration dirs" },
@@ -265,6 +266,7 @@ static void setup_terminal(void)
{
setvbuf(stderr, NULL, _IOLBF, BUFSIZ);
signal(SIGWINCH, on_sigwinch);
+ signal(SIGPIPE, SIG_IGN);
}
static void setup_automatic_flags(void)
@@ -383,6 +385,9 @@ int main(int argc, char **argv)
case 0x110:
apk_flags &= ~APK_PROGRESS;
break;
+ case 0x10f:
+ dbopts.progress_fd = atoi(optarg);
+ break;
case 0x102:
apk_flags |= APK_CLEAN_PROTECTED;
break;