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

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

[Octave-bug-tracker] [bug #49211] "test syscall" often hangs on Windows,


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #49211] "test syscall" often hangs on Windows, needs reliable waitpid implementation
Date: Thu, 21 May 2020 11:45:40 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0

Update of bug #49211 (project octave):

                  Status:               Confirmed => Patch Submitted        

    _______________________________________________________

Follow-up Comment #10:

The attached patch implements a wrapper for waitpid on Windows using win32 API
functions.

It works for me using the following test case:

clear
more off
for n = 1:10
  disp ("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
  disp (num2str (n));
  disp ("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
  [in, out, pid] = popen2 ('C:\Windows\system32\sort.exe', "/R")
  fclose (in);  # important or the process never stops
  disp('before waitpid')  # ==> no longer hangs here
  waitpid (pid)
  disp('after waitpid')
  fclose (out);
endfor


Also calling the originally motivating test in a loop no longer hangs for me:

clear
more off
cd (fullfile (OCTAVE_HOME, 'share/octave/7.0.0/etc/tests/libinterp/corefcn'))
for n = 1:10
  disp ("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
  disp (num2str (n));
  disp ("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
  test("syscalls.cc-tst", "verbose")
endfor


I'm not sure if this still qualifies as a regression because the original
issue no longer occurs since changeset 610f88ed2b78 (comment #7). So this
should probably go to default imho.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?49211>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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