Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Spack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eic_tools
Spack
Commits
042a4730
Commit
042a4730
authored
10 years ago
by
Todd Gamblin
Browse files
Options
Downloads
Patches
Plain Diff
Proper exiting for forked process in do_install()
parent
15f56cce
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/spack/spack/package.py
+15
-11
15 additions, 11 deletions
lib/spack/spack/package.py
with
15 additions
and
11 deletions
lib/spack/spack/package.py
+
15
−
11
View file @
042a4730
...
@@ -651,18 +651,18 @@ def do_install(self, **kwargs):
...
@@ -651,18 +651,18 @@ def do_install(self, **kwargs):
raise
InstallError
(
"
Unable to fork build process: %s
"
%
e
)
raise
InstallError
(
"
Unable to fork build process: %s
"
%
e
)
if
pid
==
0
:
if
pid
==
0
:
tty
.
msg
(
"
Building %s.
"
%
self
.
name
)
try
:
tty
.
msg
(
"
Building %s.
"
%
self
.
name
)
# create the install directory (allow the layout to handle
# create the install directory (allow the layout to handle
# this in case it needs to add extra files)
# this in case it needs to add extra files)
spack
.
install_layout
.
make_path_for_spec
(
self
.
spec
)
spack
.
install_layout
.
make_path_for_spec
(
self
.
spec
)
# Set up process's build environment before running install.
# Set up process's build environment before running install.
build_env
.
set_compiler_environment_variables
(
self
)
build_env
.
set_compiler_environment_variables
(
self
)
build_env
.
set_build_environment_variables
(
self
)
build_env
.
set_build_environment_variables
(
self
)
build_env
.
set_module_variables_for_package
(
self
)
build_env
.
set_module_variables_for_package
(
self
)
try
:
# Subclasses implement install() to do the build &
# Subclasses implement install() to do the build &
# install work.
# install work.
self
.
install
(
self
.
spec
,
self
.
prefix
)
self
.
install
(
self
.
spec
,
self
.
prefix
)
...
@@ -693,7 +693,11 @@ def do_install(self, **kwargs):
...
@@ -693,7 +693,11 @@ def do_install(self, **kwargs):
"
Spack will think this package is installed.
"
+
"
Spack will think this package is installed.
"
+
"
Manually remove this directory to fix:
"
,
"
Manually remove this directory to fix:
"
,
self
.
prefix
)
self
.
prefix
)
raise
# Child doesn't raise or return to main spack code.
# Just runs default exception handler and exits.
sys
.
excepthook
(
*
sys
.
exc_info
())
os
.
_exit
(
1
)
# Parent process just waits for the child to complete. If the
# Parent process just waits for the child to complete. If the
# child exited badly, assume it already printed an appropriate
# child exited badly, assume it already printed an appropriate
...
@@ -727,7 +731,7 @@ def do_uninstall(self, **kwargs):
...
@@ -727,7 +731,7 @@ def do_uninstall(self, **kwargs):
force
=
kwargs
.
get
(
'
force
'
,
False
)
force
=
kwargs
.
get
(
'
force
'
,
False
)
if
not
self
.
installed
:
if
not
self
.
installed
:
raise
InstallError
(
self
.
spec
+
"
is not installed.
"
)
raise
InstallError
(
str
(
self
.
spec
)
+
"
is not installed.
"
)
if
not
force
:
if
not
force
:
deps
=
self
.
installed_dependents
deps
=
self
.
installed_dependents
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment