From nobody@FreeBSD.org  Tue Jul 30 06:49:30 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTP id F2F6575B
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 30 Jul 2013 06:49:30 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id E137526A5
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 30 Jul 2013 06:49:30 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r6U6nUdk015072
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 30 Jul 2013 06:49:30 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r6U6nUmH015070;
	Tue, 30 Jul 2013 06:49:30 GMT
	(envelope-from nobody)
Message-Id: <201307300649.r6U6nUmH015070@oldred.freebsd.org>
Date: Tue, 30 Jul 2013 06:49:30 GMT
From: YAMAGUCHI Takanori <y@maya.st>
To: freebsd-gnats-submit@FreeBSD.org
Subject: fgrep stalls when a file contains null character
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         180937
>Category:       bin
>Synopsis:       fgrep(1) stalls when a file contains null character
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jul 30 06:50:00 UTC 2013
>Closed-Date:    
>Last-Modified:  Wed Jul 31 03:18:19 UTC 2013
>Originator:     YAMAGUCHI Takanori
>Release:        9.1-RELEASE
>Organization:
>Environment:
FreeBSD 9.1-RELEASE-p3 #0: Mon Apr 29 18:27:25 UTC 2013     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC 
>Description:
"fgrep -i numeric_or_symbol" or "grep -F -i numeric_or_symbol" stalls
when a file contains null character.

"fgrep -i alphabet_only" does not stall.
fgrep without -i does not.
grep, egrep and original GNU fgrep (ports/textproc/gnugrep) does not.

>How-To-Repeat:
dd if=/dev/zero bs=1 count=1 | fgrep -i 1

>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:
