View | Details | Raw Unified | Return to bug 30764
Collapse All | Expand All

(-)fetch.c (+15 lines)
Lines 42-47 Link Here
42
#include <sysexits.h>
42
#include <sysexits.h>
43
#include <unistd.h>
43
#include <unistd.h>
44
44
45
#include <sys/ioctl.h>
46
45
#include <fetch.h>
47
#include <fetch.h>
46
48
47
#define MINBUFSIZE	4096
49
#define MINBUFSIZE	4096
Lines 117-122 Link Here
117
{
119
{
118
    struct timeval now;
120
    struct timeval now;
119
    
121
    
122
    static pid_t pgrp = -1;
123
    int ctty_pgrp;
124
125
    if (pgrp == -1)
126
            pgrp = getpgrp();
127
128
    /*
129
     * do not print display (ie return) if we're not foreground process
130
     */
131
    if (ioctl(STDOUT_FILENO, TIOCGPGRP, &ctty_pgrp) == -1 ||
132
        ctty_pgrp != (int)pgrp)
133
        return;
134
120
    if (!v_tty || !v_level)
135
    if (!v_tty || !v_level)
121
	return;
136
	return;
122
    
137
    

Return to bug 30764