-
-
Notifications
You must be signed in to change notification settings - Fork 728
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix sensor's signal handling in ptrace monitor (#311)
When the ptrace monitor intercepts a signal, it should be returned to the origin process on the next loop iteration to continue the process' execution. Due to a wrong local variable scope, the actual signal code was lost (i.e., reset to 0) between two consequent loop iterations. This led to processes getting stuck in the container under the docker-slim control. Here is the small repro. Build the following container: ``` FROM openjdk:11 COPY <<EOF /opt/start.sh set -ex java -version EOF RUN chmod +x /opt/start.sh CMD ["/opt/start.sh"] ``` ...And try optimizing it using using the next command: ``` ./docker-slim --log-level trace build --http-probe-off --show-clogs <tag> ``` The `java -version` command would never exit before this commit.
- Loading branch information
Showing
3 changed files
with
4 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ | |
dist_linux*.tar.gz | ||
dist_mac.zip | ||
.idea | ||
*.swp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters