summaryrefslogtreecommitdiff
path: root/net/fetch
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2009-11-15 18:23:38 +0000
committerjoerg <joerg@pkgsrc.org>2009-11-15 18:23:38 +0000
commitbd10e8e6a43b8361761b83e19d6f7cae675c4e08 (patch)
tree1dcc9f1dffd4ac804b4fe1005d87093a611509fc /net/fetch
parent8640ed4de79acc0d4eec699c819a9201b69b364e (diff)
downloadpkgsrc-bd10e8e6a43b8361761b83e19d6f7cae675c4e08.tar.gz
Only check if in the foreground on systems that have TIOCPGRP.
Diffstat (limited to 'net/fetch')
-rw-r--r--net/fetch/files/fetch.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/fetch/files/fetch.c b/net/fetch/files/fetch.c
index 58ae466f2b6..6222414a46f 100644
--- a/net/fetch/files/fetch.c
+++ b/net/fetch/files/fetch.c
@@ -223,10 +223,12 @@ stat_display(struct xferstat *xs, int force)
struct timeval now;
int ctty_pgrp;
+#ifdef TIOCGPGRP
/* check if we're the foreground process */
if (ioctl(STDERR_FILENO, TIOCGPGRP, &ctty_pgrp) == -1 ||
(pid_t)ctty_pgrp != pgrp)
return;
+#endif
gettimeofday(&now, NULL);
if (!force && now.tv_sec <= xs->last.tv_sec)