bugGNU Octave - Bugs: bug #60180, Command line startup on Windows...

 
 

bug #60180: Command line startup on Windows does not wait for completion

Submitted by:  Holger Zeinert <hze>
Submitted on:  Sat 06 Mar 2021 12:13:54 PM UTC  
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Other
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  6.2.0 Operating System:  Microsoft Windows

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project 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 lostbard (Posted a comment)
  • -email is unavailable- added by hze (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.6