octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #45625] fork on command line


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #45625] fork on command line
Date: Tue, 28 Jul 2015 02:46:39 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.1.0

Follow-up Comment #6, bug #45625 (project octave):

So besides Rik's point about making the fork function error if a user tries to
call it from the top level, there is another lower-level bug here with fork
and the Qt libraries.

The following script works fine for me with --no-gui-libs (octave-cli), but
hangs as Ceral describes when I run it in the GUI or with --no-gui (meaning
Qt's event loop is still running).


function fork_test ()
  pid = fork ();
  if (pid != 0)
    printf ("waiting for child process %d…", pid);
    fflush (stdout);
    [~, sts] = waitpid (pid);
    printf (" done: %d\n", WEXITSTATUS (sts));
  else
    pause (3);
    exit (3);
  endif
endfunction


I think this hang may be related to bug #38305, where it was observed that
there is some interference between the way Octave and Qt both want to manage
child processes. I don't have an exact explanation but it certainly seems
related.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?45625>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]