From amjudge@dsg.cs.tcd.ie  Wed Nov 30 06:07:08 1994
Received: from longvalley.dsg.cs.tcd.ie (longvalley.dsg.cs.tcd.ie [134.226.36.37]) by freefall.cdrom.com (8.6.8/8.6.6) with SMTP id GAA16536 for <FreeBSD-gnats-submit@freebsd.org>; Wed, 30 Nov 1994 06:06:26 -0800
Received: from janis.dsg.cs.tcd.ie by longvalley.dsg.cs.tcd.ie id aa23213;
          30 Nov 94 14:06 GMT
Received: (from amjudge@localhost) by janis.dsg.cs.tcd.ie (8.6.9/8.6.9) id OAA23202; Wed, 30 Nov 1994 14:06:18 GMT
Message-Id: <199411301406.OAA23202@janis.dsg.cs.tcd.ie>
Date: Wed, 30 Nov 1994 14:06:18 GMT
From: Alan Judge <amjudge@dsg.cs.tcd.ie>
Reply-To: amjudge@dsg.cs.tcd.ie
To: FreeBSD-gnats-submit@freebsd.org
Cc: amjudge@dsg.cs.tcd.ie
Subject: Bug in TIOCSTAT handling in kernel.
X-Send-Pr-Version: 3.2

>Number:         33
>Category:       kern
>Synopsis:       TIOCSTAT doesn't appear to work
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    core (FreeBSD core team)
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 30 06:10:01 1994
>Closed-Date:    Wed Nov 30 07:09:54 PST 1994
>Last-Modified:
>Originator:     Alan Judge
>Release:        FreeBSD 2.0-RELEASE i386
>Organization:
Trinity College, Dublin, Ireland
>Environment:

	

>Description:

	The TIOCSTAT ioctl (which admittedly isn't documented) doesn't
	seem to work.  From a quick look at the kernel code, it looks like
	it should.

	The only program that I know of that is affected by the
	problem is bash, but I would guess that any shells with
	command line editing would also be hit.

>How-To-Repeat:

Run:

#include <sys/types.h>
#include <sys/ioctl.h>

main()
{
	ioctl(1, TIOCSTAT, (char *)0);
}

>Fix:
	
	

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: davidg 
State-Changed-When: Wed Nov 30 07:09:54 PST 1994 
State-Changed-Why:  
The bug was caused by the ioctl requiring the address of an int 
to be copied in. This wasn't necessary - I've changed the ioctl 
to be a no-arg type. All things built using the TIOCSTAT ioctl will 
have to be re-compiled and linked. 
>Unformatted:



