Skip to content

Commit

Permalink
Introduce command line option to disable shell
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Pfeiffer committed Aug 21, 2018
1 parent 950f7b5 commit ff82976
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
15 changes: 3 additions & 12 deletions lib/init.g
Original file line number Diff line number Diff line change
Expand Up @@ -938,16 +938,6 @@ BindGlobal ("ShowSystemInformation", function ()
end );


#############################################################################
##
## Initialize the IsLIBGAP variable (if not done before). If this variable
## is false, an interactive session will be started.
## Otherwise no interactive session is started.
##
if not IsBound( IsLIBGAP ) then
BIND_CONSTANT( "IsLIBGAP", false );
fi;

#############################################################################
##
## Finally, deal with the lists of global variables.
Expand Down Expand Up @@ -1037,8 +1027,9 @@ InstallAndCallPostRestore( function()
od;
end );

if IsLIBGAP then
# GAP is used as a library, do not start an interactive session

if GAPInfo.CommandLineOptions.noshell then
# do not start an interactive session
elif IsHPCGAP and THREAD_UI() then
ReadLib("hpc/consoleui.g");
MULTI_SESSION();
Expand Down
4 changes: 3 additions & 1 deletion lib/system.g
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ BIND_GLOBAL( "GAPInfo", rec(
help := [ "Run ProfileLineByLine(<filename>) with recordMem := true on GAP start"] ),
rec( long := "cover", default := "", arg := "<file>",
help := [ "Run CoverageLineByLine(<filename>) on GAP start"] ),
rec( long := "enableMemCheck", default := false)
rec( long := "enableMemCheck", default := false),
rec( long := "noshell", default := false,
help := [ "Disable the GAP shell" ] )
],
) );

Expand Down

0 comments on commit ff82976

Please sign in to comment.