bugGNU Octave - Bugs: bug #60180, [MXE Octave] Command line startup...

 
 

bug #60180: [MXE Octave] Command line startup on Windows does not wait for completion

Submitter:  Holger Zeinert <hze>
Submitted:  Sat 06 Mar 2021 12:13:54 PM UTC
   
 
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Other
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 7.0.90 Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 19 Dec 2021 05:50:00 PM UTC, comment #4: 

This seems to be working with the new launchers. At least in the configuration we are using on the CI for the nightly builds from Kai's octave.space (currently failing due to a different issue):
https://github.com/gnu-octave/octave-buildbot/actions

Closing as fixed.

Markus Mützel <mmuetzel>
Group administrator
Tue 23 Nov 2021 08:58:35 AM UTC, comment #3: 

This will probably work as expected in comment #0 when/if we start using the launcher executables.

See: https://octave.discourse.group/t/1818

Markus Mützel <mmuetzel>
Group administrator
Mon 08 Mar 2021 04:12:59 PM UTC, comment #2: 

Thanks for you reply.

I suppose you mean:

c:\Program Files\GNU Octave\Octave-6.2.0\mingw64\bin\octave.bat


Yes, that one waits, but only for nogui mode:


Rem   Start Octave (this detaches and immediately returns).
if %GUI_MODE%==1 (
  start octave-gui.exe --gui %*
) else (
  octave-cli.exe %*
)


However, the GUI mode is very helpful to debug the background Octave processing and once everything is fine switch back to no gui.

So, it would be good if both gui and nogui would wait. Backgrounding a calculation can then be controlled by the caller, if needed.

For me, it does not matter whether this is possible with the .bat or .vbs version. Just one of it should wait in both cases gui and nogui.

Holger Zeinert <hze>
Sun 07 Mar 2021 12:07:29 PM UTC, comment #1: 

There is a .bat script for use when running from command line - see also bug #53938

John Donoghue <lostbard>
Group Member
Sat 06 Mar 2021 12:13:54 PM UTC, original submission:  

Hi,

when trying to embed an Octave call in another script or in another process, it is important that you can wait until Octave has finished.

With the WSCRIPT vbs start command on Windows, currently neither the GUI nor the NOGUI option waits until Octave has finished.
So, WSCRIPT will end immediately after Octave is started in the background.
There is no way for the caller to decide to wait.

This can be changed in the startup script

C:\Program Files\GNU Octave\Octave-6.2.0\octave.vbs

by adding ", TRUE" to both wshShell.Run commands:


' start octave-gui, either with console shown or hidden
If GUI_MODE = 1 then
  AllArgs = AllArgs & " " & chr(34) & "--gui" & chr(34)
  wshShell.Run chr(34) & OctavePath & "\bin\octave-gui.exe" & Chr(34) & AllArgs, 0, TRUE
Else
  wshShell.Run chr(34) & OctavePath & "\bin\octave-gui.exe" & Chr(34) & AllArgs, 1, TRUE
End If


It would be great if you can add this (or explain a different way to achieve waiting in the caller process).

Thanks
Holger

Holger Zeinert <hze>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by jwe (Updated the item)
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by hze (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-12-19 mmuetzel StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2021-11-23 mmuetzel SummaryCommand line startup on Windows does not wait for completion [MXE Octave] Command line startup on Windows does not wait for completion
    2021-11-23 mmuetzel StatusNone In Progress
        Release6.2.0 7.0.90
    2021-11-22 jwe CategoryNone Configuration and Build System

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code