Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions scripts/linuxcnc.in
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ if [[ ! -v LINUXCNC_OPENGL_PLATFORM || "${LINUXCNC_OPENGL_PLATFORM}" == "glx" ]]
export QT_QPA_PLATFORM="xcb"
fi

# An OpenMP build of OpenBLAS reserves about 1 GiB per CPU when numpy
# is imported; with less RAM than that the kernel refuses to fork the
# GUI (ENOMEM). Nothing here needs threaded BLAS.
export OMP_NUM_THREADS="${OMP_NUM_THREADS:-1}"

################################################################################
# 0. Values that come from configure
################################################################################
Expand Down
8 changes: 4 additions & 4 deletions src/emc/usr_intf/axis/scripts/axis.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@


# import pdb
import sys, os
import sys, os, subprocess
import string
BASE = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), ".."))
sys.path.insert(0, os.path.join(BASE, "lib", "python"))
Expand Down Expand Up @@ -4298,15 +4298,15 @@ def check_dynamic_tabs():
if postgui_halfile is not None:
for f in postgui_halfile:
if f.lower().endswith('.tcl'):
res = os.spawnvp(os.P_WAIT, "haltcl", ["haltcl", "-i", vars.emcini.get(), f])
res = subprocess.call(["haltcl", "-i", vars.emcini.get(), f])
else:
res = os.spawnvp(os.P_WAIT, "halcmd", ["halcmd", "-i", vars.emcini.get(), "-f", f])
res = subprocess.call(["halcmd", "-i", vars.emcini.get(), "-f", f])
if res: raise SystemExit(res)

if postgui_halcmds is not None:
for f in postgui_halcmds:
f = os.path.expanduser(f)
res = os.spawnvp(os.P_WAIT, "halcmd", ["halcmd"] + f.split())
res = subprocess.call(["halcmd"] + f.split())
if res: raise SystemExit(res)

open_initial_file()
Expand Down
8 changes: 4 additions & 4 deletions src/emc/usr_intf/gmoccapy/gmoccapy.py
Original file line number Diff line number Diff line change
Expand Up @@ -6678,9 +6678,9 @@ def _make_hal_pins(self):
if postgui_halfile is not None:
for f in postgui_halfile:
if f.lower().endswith('.tcl'):
res = os.spawnvp(os.P_WAIT, "haltcl", ["haltcl", "-i", inifile, f])
res = subprocess.call(["haltcl", "-i", inifile, f])
else:
res = os.spawnvp(os.P_WAIT, "halcmd", ["halcmd", "-i", inifile, "-f", f])
res = subprocess.call(["halcmd", "-i", inifile, "-f", f])
if res:
LOG.error('postgui halfile error:{}'.format(res))
raise SystemExit(res)
Expand All @@ -6690,7 +6690,7 @@ def _make_hal_pins(self):
if postgui_halcmds is not None:
for f in postgui_halcmds:
f = os.path.expanduser(f)
res = os.spawnvp(os.P_WAIT, "halcmd", ["halcmd"] + f.split())
res = subprocess.call(["halcmd"] + f.split())
if res:
LOG.error('postgui command error:{}'.format(res))
raise SystemExit(res)
Expand Down Expand Up @@ -6718,7 +6718,7 @@ def _terminate(signum, frame):
signal.signal(signal.SIGINT, _terminate)

# The startup handler's SystemExit is lost where Python ignores
# exceptions, as in the os.fork() hooks of the postgui spawns above.
# exceptions, such as in an os.fork() hook.
# The flag still says that a SIGTERM came.
if _terminate_requested:
LOG.info("gmoccapy received SIGTERM during startup, shutting down")
Expand Down
4 changes: 2 additions & 2 deletions src/emc/usr_intf/gscreen/gscreen.py
Original file line number Diff line number Diff line change
Expand Up @@ -4797,9 +4797,9 @@ def __setitem__(self, item, value):
if postgui_halfile is not None:
for f in postgui_halfile:
if f.lower().endswith('.tcl'):
res = os.spawnvp(os.P_WAIT, "haltcl", ["haltcl", "-i", inifile, f])
res = subprocess.call(["haltcl", "-i", inifile, f])
else:
res = os.spawnvp(os.P_WAIT, "halcmd", ["halcmd", "-i", inifile, "-f", f])
res = subprocess.call(["halcmd", "-i", inifile, "-f", f])
if res: raise SystemExit(res)
Gtk.main()

6 changes: 3 additions & 3 deletions src/emc/usr_intf/qtvcp/qtvcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,9 +499,9 @@ def postgui(self):
for f in postgui_halfile:
f = os.path.expanduser(f)
if f.lower().endswith('.tcl'):
res = os.spawnvp(os.P_WAIT, "haltcl", ["haltcl", "-i",self.inipath, f])
res = subprocess.call(["haltcl", "-i",self.inipath, f])
else:
res = os.spawnvp(os.P_WAIT, "halcmd", ["halcmd", "-i",self.inipath,"-f", f])
res = subprocess.call(["halcmd", "-i",self.inipath,"-f", f])
if res: raise SystemExit(res)

def postgui_cmd(self):
Expand All @@ -510,7 +510,7 @@ def postgui_cmd(self):
if postgui_commands is not None:
for f in postgui_commands:
f = os.path.expanduser(f)
res = os.spawnvp(os.P_WAIT, "halcmd", ["halcmd"] + f.split())
res = subprocess.call(["halcmd"] + f.split())
if res: raise SystemExit(res)

# This can be called by control c or an early error.
Expand Down
Loading