<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Java 2 HP-UX java.net.PlainSocketImpl.socketClose() hang in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/java-2-hp-ux-java-net-plainsocketimpl-socketclose-hang/m-p/2496321#M728409</link>
    <description>Here is some sample code (on other platfoms e.g. Solaris, win32, etc. the code works in the expected fashion .. on HP-UX the close() simply hangs forever).&lt;BR /&gt;&lt;BR /&gt;import java.io.*;&lt;BR /&gt;import java.net.*;&lt;BR /&gt;&lt;BR /&gt;public class scr1443&lt;BR /&gt;{&lt;BR /&gt;    public static void main(String[] args)&lt;BR /&gt;    {&lt;BR /&gt;        new scr1443();&lt;BR /&gt;    }&lt;BR /&gt;    &lt;BR /&gt;    scr1443()&lt;BR /&gt;    {&lt;BR /&gt;        try&lt;BR /&gt;        {&lt;BR /&gt;            ServerSocket acceptor = new ServerSocket(7777);&lt;BR /&gt;            new SocketCloser(acceptor).start();&lt;BR /&gt;            while (true)&lt;BR /&gt;            {&lt;BR /&gt;                System.out.println("scr1443 .. accepting");&lt;BR /&gt;                acceptor.accept();&lt;BR /&gt;            }&lt;BR /&gt;        } catch(Exception e) { e.printStackTrace(); }&lt;BR /&gt;    }&lt;BR /&gt;    &lt;BR /&gt;    class SocketCloser&lt;BR /&gt;    extends Thread&lt;BR /&gt;    {&lt;BR /&gt;        ServerSocket acceptor;&lt;BR /&gt;        &lt;BR /&gt;        SocketCloser(ServerSocket acceptor)&lt;BR /&gt;        {&lt;BR /&gt;            this.acceptor = acceptor;&lt;BR /&gt;        }&lt;BR /&gt;        &lt;BR /&gt;        public void run()&lt;BR /&gt;        {&lt;BR /&gt;            try { Thread.sleep(5000); } catch(InterruptedException e) { }&lt;BR /&gt;            System.out.println("SocketCloser .. closing");&lt;BR /&gt;            try { acceptor.close(); } catch(IOException e) { e.printStackTrace(); }&lt;BR /&gt;        }&lt;BR /&gt;    }&lt;BR /&gt;}&lt;BR /&gt;</description>
    <pubDate>Wed, 21 Feb 2001 11:52:37 GMT</pubDate>
    <dc:creator>David Grigglestone</dc:creator>
    <dc:date>2001-02-21T11:52:37Z</dc:date>
    <item>
      <title>Java 2 HP-UX java.net.PlainSocketImpl.socketClose() hang</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/java-2-hp-ux-java-net-plainsocketimpl-socketclose-hang/m-p/2496320#M728408</link>
      <description>If there is a more suitable forum for this question could somone please direct me (I could not find one from the HP site).&lt;BR /&gt;&lt;BR /&gt;Anyway the issue is on HP-UX (iirespective of jdk1.2.2 or 1.3) a call to java.net.Socket.close() [which results in the call to java.net.PlainSocketImpl.socketClose()] seems to hang (at least for a period). This certainly does not happen on any of the other Java platforms I have tested.&lt;BR /&gt;&lt;BR /&gt;Has anyone seen anything similar and/or know of a workaround ?&lt;BR /&gt;&lt;BR /&gt;thanks, David</description>
      <pubDate>Tue, 20 Feb 2001 21:59:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/java-2-hp-ux-java-net-plainsocketimpl-socketclose-hang/m-p/2496320#M728408</guid>
      <dc:creator>David Grigglestone</dc:creator>
      <dc:date>2001-02-20T21:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: Java 2 HP-UX java.net.PlainSocketImpl.socketClose() hang</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/java-2-hp-ux-java-net-plainsocketimpl-socketclose-hang/m-p/2496321#M728409</link>
      <description>Here is some sample code (on other platfoms e.g. Solaris, win32, etc. the code works in the expected fashion .. on HP-UX the close() simply hangs forever).&lt;BR /&gt;&lt;BR /&gt;import java.io.*;&lt;BR /&gt;import java.net.*;&lt;BR /&gt;&lt;BR /&gt;public class scr1443&lt;BR /&gt;{&lt;BR /&gt;    public static void main(String[] args)&lt;BR /&gt;    {&lt;BR /&gt;        new scr1443();&lt;BR /&gt;    }&lt;BR /&gt;    &lt;BR /&gt;    scr1443()&lt;BR /&gt;    {&lt;BR /&gt;        try&lt;BR /&gt;        {&lt;BR /&gt;            ServerSocket acceptor = new ServerSocket(7777);&lt;BR /&gt;            new SocketCloser(acceptor).start();&lt;BR /&gt;            while (true)&lt;BR /&gt;            {&lt;BR /&gt;                System.out.println("scr1443 .. accepting");&lt;BR /&gt;                acceptor.accept();&lt;BR /&gt;            }&lt;BR /&gt;        } catch(Exception e) { e.printStackTrace(); }&lt;BR /&gt;    }&lt;BR /&gt;    &lt;BR /&gt;    class SocketCloser&lt;BR /&gt;    extends Thread&lt;BR /&gt;    {&lt;BR /&gt;        ServerSocket acceptor;&lt;BR /&gt;        &lt;BR /&gt;        SocketCloser(ServerSocket acceptor)&lt;BR /&gt;        {&lt;BR /&gt;            this.acceptor = acceptor;&lt;BR /&gt;        }&lt;BR /&gt;        &lt;BR /&gt;        public void run()&lt;BR /&gt;        {&lt;BR /&gt;            try { Thread.sleep(5000); } catch(InterruptedException e) { }&lt;BR /&gt;            System.out.println("SocketCloser .. closing");&lt;BR /&gt;            try { acceptor.close(); } catch(IOException e) { e.printStackTrace(); }&lt;BR /&gt;        }&lt;BR /&gt;    }&lt;BR /&gt;}&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Feb 2001 11:52:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/java-2-hp-ux-java-net-plainsocketimpl-socketclose-hang/m-p/2496321#M728409</guid>
      <dc:creator>David Grigglestone</dc:creator>
      <dc:date>2001-02-21T11:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: Java 2 HP-UX java.net.PlainSocketImpl.socketClose() hang</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/java-2-hp-ux-java-net-plainsocketimpl-socketclose-hang/m-p/2496322#M728410</link>
      <description>A problem fitting the description was logged as a defect on Feb 21st: JAGad51176. It is a duplicate of Javasoft bug 4096914.</description>
      <pubDate>Fri, 23 Feb 2001 14:42:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/java-2-hp-ux-java-net-plainsocketimpl-socketclose-hang/m-p/2496322#M728410</guid>
      <dc:creator>Andy Bennett</dc:creator>
      <dc:date>2001-02-23T14:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: Java 2 HP-UX java.net.PlainSocketImpl.socketClose() hang</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/java-2-hp-ux-java-net-plainsocketimpl-socketclose-hang/m-p/2496323#M728411</link>
      <description>According to Javasoft that was fixed in 1.2 FCS .. seems not in HP-UX 1.3. I did find the HP-UX JVM switch -XdoCloseWithReadPending which seems to workaround the problem, however this should be the default behavior - I shouldn't need a special switch.</description>
      <pubDate>Fri, 23 Feb 2001 15:01:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/java-2-hp-ux-java-net-plainsocketimpl-socketclose-hang/m-p/2496323#M728411</guid>
      <dc:creator>David Grigglestone</dc:creator>
      <dc:date>2001-02-23T15:01:39Z</dc:date>
    </item>
  </channel>
</rss>

