summaryrefslogtreecommitdiff
path: root/net/fetch
diff options
context:
space:
mode:
authorjoerg <joerg>2009-11-15 18:23:38 +0000
committerjoerg <joerg>2009-11-15 18:23:38 +0000
commitbeb3aabc099f7fdd3ffa1b2863072e75c8b25771 (patch)
tree1dcc9f1dffd4ac804b4fe1005d87093a611509fc /net/fetch
parent87e8038ec7325bc4320102cf7166a19616c492d5 (diff)
downloadpkgsrc-beb3aabc099f7fdd3ffa1b2863072e75c8b25771.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)