Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-20546

spark-class gets syntax error in posix mode

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.0.2
    • 2.1.2, 2.2.0
    • Deploy
    • None

    Description

      spark-class gets the following error when running in posix mode:

      spark-class: line 78: syntax error near unexpected token `<'
      spark-class: line 78: `done < <(build_command "$@")'
      


      It appears to be complaining about the process substitution:

      CMD=()
      while IFS= read -d '' -r ARG; do
        CMD+=("$ARG")
      done < <(build_command "$@")
      


      This can be reproduced by first turning on allexport then posix mode:

      set -a -o posix 

      then run something like spark-shell which calls spark-class.


      The simplest fix is probably to always turn off posix mode in spark-class before the while loop.
      This was previously reported in SPARK-8417 which closed with cannot reproduce.

      Attachments

        Activity

          People

            jyu0 Jessie Yu
            jyu0 Jessie Yu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: