From owner-freebsd-java Thu Jan 28 08:21:41 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA06668 for freebsd-java-outgoing; Thu, 28 Jan 1999 08:21:41 -0800 (PST) (envelope-from owner-freebsd-java@FreeBSD.ORG) Received: from ns.mt.sri.com (sri-gw.MT.net [206.127.105.141]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA06634 for ; Thu, 28 Jan 1999 08:21:34 -0800 (PST) (envelope-from nate@mt.sri.com) Received: from mt.sri.com (rocky.mt.sri.com [206.127.76.100]) by ns.mt.sri.com (8.8.8/8.8.8) with SMTP id JAA15694; Thu, 28 Jan 1999 09:21:28 -0700 (MST) (envelope-from nate@rocky.mt.sri.com) Received: by mt.sri.com (SMI-8.6/SMI-SVR4) id JAA29588; Thu, 28 Jan 1999 09:21:27 -0700 Date: Thu, 28 Jan 1999 09:21:27 -0700 Message-Id: <199901281621.JAA29588@mt.sri.com> From: Nate Williams MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: hashi@csl.rdc.toshiba.co.jp (Mikio Hashimoto) Cc: freebsd-java@FreeBSD.ORG Subject: Re: signal handling in FreeBSD Java In-Reply-To: <199901280818.RAA18097@mailhost.csl.rdc.toshiba.co.jp> References: <199901280818.RAA18097@mailhost.csl.rdc.toshiba.co.jp> X-Mailer: VM 6.34 under 19.16 "Lille" XEmacs Lucid Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > I'm developing a program that uses JNI and asynchronous IO. The > program handles asynchronous input from a special socket interface > through JNI, as shown in figure below. > On arriving an asynchronous input, a signal SIGUSR1 is issued from > the socket interface to the java process, then a preregistered signal > handler of the java process is called. I'm not sure if this is documented, but SIGUSR1 is not allowed in JNI programs as it's the signal used internally in the VM to signal 'thread interrupt'. > User Java Library(with awt) > ------------------------------------------- > freebsd-jdk 1.1.7 > > Java VM +-------------------------------- > | Native Method (written in C ) > -----------+--------------------------------- > IO,etc | special socket I/F for IEEE 1394 > Free BSD kernel > > This program well worked for simple test program without awt widget > library. But once GUI program with awt applied to the program, the > java process frequently crashes or hangs up. Sometimes following > messages can be seen. > > 1) X11TransSocketINETConnect: Can't connect errno=4 > 2) Warning: select failed > > I guess the message 1) tells that some signals(probably my socket > signal) disrupted socket operation in X windows system. The error > number four corresponds to the EINTR error. Is it right? See above. Try using SIGUSR2 and see if things work better. Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message