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: Ceral Paquet
Subject: [Octave-bug-tracker] [bug #45625] fork on command line
Date: Sat, 25 Jul 2015 12:04:03 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0

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

More fork weirdness causing octave to hang. 

>> A=fork_test(); % this seems to work, it returns and I get a plot
waiting for 6261
>> figure % this does nothing
>> figure 2 % ditto
>> close all % ditto
>> 
>> 
>> 
>> 
>> 
>> exit % doesn't work - we're stuck


The function is below. Again, there isn't much info on how to use fork so this
is a bit of guesswork.



function A = fork_test()

[pid, msg] = fork();

if pid
  # wait child to complete
  disp(["waiting for ", num2str(pid)]);
  % do some useful work  
  plot(1:10)

  waitpid(pid)
else
  % do some useful work
  A = randn(100);
  pause(10);
endif



    _______________________________________________________

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]