wait child process but get error: 'pid is not a child of this shell'

后端 未结 3 1256
一个人的身影
一个人的身影 2020-12-30 01:08

I write a script to get data from HDFS parrallel,then I wait these child processes in a for loop, but sometimes it returns \"pid is not a child of this shell\". sometimes, i

3条回答
  •  没有蜡笔的小新
    2020-12-30 01:36

    Either your while loop or the for loop runs in a subshell, which is why you cannot await a child of the (parent, outer) shell.

    Edit this might happen if the while loop or for loop is actually

    (a) in a {...} block (b) participating in a piper (e.g. for....done|somepipe)

提交回复
热议问题