Skip to content

Commit

Permalink
message pipe fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mviereck committed Feb 6, 2022
1 parent c99244d commit f867251
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions x11docker
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ watchmessagefifo() { # watch for messages coming from container or do
[ "$Line" ] && Message="$Message
$Line"
grep -q -E ":WARNING|:NOTE|:DEBUGNOTE|:VERBOSE|:ERROR|:STDOUT" <<< "$Line" && {
Messagetype=":$(echo "$Line" | rev | cut -d: -f1 | rev)"
Messagetype=":$(echo "$Line" | rev | cut -d: -f1 | rev | tr -d ' ')"
Message="${Message%$Messagetype }"
Message="$(tail -n +2 <<< "$Message")" # remove leading newline
case "$Messagetype" in
Expand Down Expand Up @@ -4402,7 +4402,6 @@ check_image() { # get some image information
Imagecommand="$(parse_inspect "$Imageinspect" "Config" "Cmd")"
debugnote "Image CMD: $Imagecommand"
[ -z "$Containercommand" ] && {
note "Container command: $Imagecommand"
Containercommand="$Imagecommand"
grep -q "$(convertpath share "$Containerrc")" <<< "$Imagecommand" && error "Recursion error: Found CMD $Imagecommand in image.
Did you use 'docker commit' with an x11docker container?
Expand Down Expand Up @@ -6104,6 +6103,7 @@ Timetosaygoodbyefile=$(convertpath share "$Timetosaygoodbyefile")
echo "
debugnote \"cmdrc: Running container command:
$Containerentrypoint $Containercommand\"
note \"Container command: $Containerentrypoint $Containercommand\"
"
case "$Backend" in
host|chroot)
Expand Down Expand Up @@ -8722,11 +8722,11 @@ setup_fifo() { # set up fifo channels (also option --stdin)
# FDcmdstdin stdin>>$Cmdstinfile --stdin with catstdin, redirection of &0
# FDtimetosaygoodbye $Timetosaygoodbyefifo for saygoodbye() and waitfortheend()
# FDwatchpid $Watchpidfifo for watchpidlist()

case "$Mobyvm" in
yes) Usemkfifo="no" ;;
no) Usemkfifo="yes" ;;
esac

[ "$Runtime" = "kata-runtime" ] && Usemkfifo="no"
[ "$Runtime" = "sysbox-runc" ] && Usemkfifo="no"
# redirect stdin to named pipe. Named pipe is shared with container and used as stdin of container command in containerrc
Expand Down

0 comments on commit f867251

Please sign in to comment.