behavior of fork() in 1.3 vs. 1.4.2

Discussion in 'Java' started by Marc Rochkind, Jul 10, 2003.

  1. I'm executing a raw UNIX fork system call in JNI code. In 1.3.x, that and
    what came next worked perfectly, near as I can tell.

    But, upon switching to 1.4.2, I notice that an exception thrown in the
    child hangs the process... this worked fine in 1.3.x.

    I can think of various explanations. (Example: a fork() preserves only a
    single thread, and other threads that might have been in the parent are, in
    the child, terminated. Perhaps the exception stuff was multi-threaded.)

    But, does anyone know of something done specifically that broke this in
    1.4.x?

    --Marc
    Marc Rochkind, Jul 10, 2003
    #1
    1. Advertising

  2. On Thu, 10 Jul 2003 16:46:00 -0600, Marc Rochkind <>
    wrote:

    > I'm executing a raw UNIX fork system call in JNI code. In 1.3.x, that and
    > what came next worked perfectly, near as I can tell.
    >
    > But, upon switching to 1.4.2, I notice that an exception thrown in the
    > child hangs the process... this worked fine in 1.3.x.
    >
    > I can think of various explanations. (Example: a fork() preserves only a
    > single thread, and other threads that might have been in the parent are,
    > in the child, terminated. Perhaps the exception stuff was multi-
    > threaded.)
    >
    > But, does anyone know of something done specifically that broke this in
    > 1.4.x?
    >
    > --Marc
    >


    Seems that running interpreter-only (-Xint) fixed the problem, which I can
    certainly believe. That is fine (no need for speed), but perhaps someone
    could confirm why this is so?

    --Marc
    Marc Rochkind, Jul 10, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. CwK

    fork

    CwK, Dec 22, 2003, in forum: Perl
    Replies:
    2
    Views:
    925
    Misha Gale
    Jan 4, 2004
  2. Josh Denny

    fork in perl 5.8.3 on windows

    Josh Denny, Mar 2, 2004, in forum: Perl
    Replies:
    2
    Views:
    6,658
    Jim Gibson
    Mar 2, 2004
  3. Mantorok Redgormor
    Replies:
    70
    Views:
    1,748
    Dan Pop
    Feb 17, 2004
  4. Yin
    Replies:
    1
    Views:
    420
    Donn Cave
    Sep 16, 2005
  5. Eric Snow

    os.fork and pty.fork

    Eric Snow, Jan 8, 2009, in forum: Python
    Replies:
    0
    Views:
    568
    Eric Snow
    Jan 8, 2009
Loading...

Share This Page