From owner-freebsd-current Tue Feb 24 08:55:29 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA29819 for freebsd-current-outgoing; Tue, 24 Feb 1998 08:55:29 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from dyson.iquest.net (dyson.iquest.net [198.70.144.127]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA29810 for ; Tue, 24 Feb 1998 08:55:26 -0800 (PST) (envelope-from toor@dyson.iquest.net) Received: (from root@localhost) by dyson.iquest.net (8.8.8/8.8.8) id LAA00660; Tue, 24 Feb 1998 11:55:13 -0500 (EST) (envelope-from toor) From: "John S. Dyson" Message-Id: <199802241655.LAA00660@dyson.iquest.net> Subject: Re: problems with XView and FreeBSD In-Reply-To: <34ECD591.41C67EA6@starbase.spd.louisville.edu> from "V Edward Gold, Jr." at "Feb 20, 98 01:00:01 am" To: vegold01@starbase.spd.louisville.edu (V Edward Gold, Jr.) Date: Tue, 24 Feb 1998 11:55:13 -0500 (EST) Cc: freebsd-current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL32 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG V Edward Gold, Jr. said: > I just recently started playing with an application that was written > originally on SunOS 4.1.3 and I ported it to FreeBSD 2.2.1 and > everything was fine. I upgraded to 3.0 and now I experience problems > apparently caused by using the notify_do_dispatch() call and ANY > subsequent file I/O. I went ahead and attached the sample program that > demonstrates this oddity, in case anyone wants to help me locate its > source/cure. I compile it as follows: > gcc -o main main.c -I/usr/X11R6/include -g -L/usr/X11R6/lib -lxview > \ -lX11 -lolgx > > while( 1 ) > { > char cmd_buffer[1024]; > sprintf( msg, prompt ); > write( fileno( stdout ), msg, strlen( msg ) ); > fflush( stdout ); > while( read( fileno(stdin), sizeof(cmd_buffer), cmd_buffer ) != 0 ); The order of args is wrong ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ > } > > free( cmd_word ); > } -- John | Never try to teach a pig to sing, dyson@freebsd.org | it just makes you look stupid, jdyson@nc.com | and it irritates the pig. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message