diff --git a/builtin/grep.c b/builtin/grep.c
index e741aca18cc1c9c3e5cfef3db996d05956bedc2d..9fc3e95cc610c9df7d2b17eae59ac2c161443982 100644 (file)
--- a/builtin/grep.c
+++ b/builtin/grep.c
#ifndef NO_PTHREADS
if (use_threads) {
- if (opt.pre_context || opt.post_context || opt.file_break ||
- opt.funcbody)
+ if (!(opt.name_only || opt.unmatch_name_only || opt.count)
+ && (opt.pre_context || opt.post_context ||
+ opt.file_break || opt.funcbody))
skip_first_line = 1;
start_threads(&opt);
}