Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 May 1996 10:20:44 +0100
From:      tom@uces.bangor.ac.uk (Tom Crummey (ADM))
To:        freebsd-hackers@freebsd.org
Subject:   write and pty's
Message-ID:  <199605140920.KAA04825@newton.uces>

next in thread | raw e-mail | index | archive | help
Hello,

I sent this message to freebsd-questions, but it is probably better on
this list.

If you do reply to this, could you copy to me directly as I'm not on the
hackers list (yet).

Thanks.


----- Begin Included Message -----

>From owner-freebsd-questions@freefall.freebsd.org Fri May 10 02:01:21 1996
Original-Received: from localhost (daemon@localhost) by 
                   freefall.freebsd.org (8.7.3/8.7.3) with SMTP id PAA27629 
                   Thu, 9 May 1996 15:31:30 -0700 (PDT)
Pp-Warning: Illegal Received field on preceding line
From: Tom Crummey (ADM) <tom>
Subject: write and pty's
To: freebsd-questions@freebsd.org
Date: Thu, 9 May 96 23:29:56 BST
X-Mailer: ELM [version 2.3 PL11]
Sender: owner-questions@freebsd.org
X-Loop: FreeBSD.org
Content-Length: 1815

Hello,

I have been trying to track down a problem in the xview library code
which causes the cmdtool program to continuously output to the pty
it is using. For example, start a cmdtool and type return. You will
get a continuous stream of prompts as if you were continually typing
the return key.

After some hours with xxgdb and libraries compiled with debugging symbols,
I tracked the problem to a write call. This write call returns 0 even 
though it appears that a charater has been written. The fact that this
call returns 0 means that the write pointer in the cmdtool code is not
updated and so it is written again etc. (you get the picture)

It seems that there is a problem with the write system call returning 0 
instead of the number of characters written in this particular case. 
The pty is supposedly not in remote mode.

Does anyone have any idea why the write call would return 0 even when
characters have been written? Could anyone who knows the pty kernel 
code comment?

I can send the segment of code involved, but I suspect it won't help
as there is too much context requried to see what is going on.

I think I might be getting slightly out of my depth.....

glug ..glug...

I am running FreeBSD-2.2-SNAP 960128 with the xview-3.2 patched for X11R6.
The problem also exists on 2.1-RELEASE.
-- 
Tom.

----------------------------------------------------------------------------
 Tom Crummey,                    EMAIL: tom@uces.bangor.ac.uk |     /\     
 University of Wales, Bangor,                                 |    /  \/\  
 Unit for Coastal and Estuarine Studies,                      | /\/    \ \ 
 Ynys Faelog, Menai Bridge,           TEL: +44 (0)1248 713808 |/  ======\=\
 Gwynedd, LL59 5EY, U.K.              FAX: +44 (0)1248 716729 | B A N G O R
----------------------------------------------------------------------------


----- End Included Message -----




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199605140920.KAA04825>