libc - Fix bug in rcmdsh()
commit8175f6e09c5203a3246150bbd06b46a246662794
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 26 Jul 2017 19:41:20 +0000 (26 12:41 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 26 Jul 2017 19:41:20 +0000 (26 12:41 -0700)
tree46deb51b213bdbbf365f60e171059d4ba8db656f
parent10a640f0cc2d35ba7f347bf02a032acca5e071c4
libc - Fix bug in rcmdsh()

* rcmdsh() (which really nothing should be using any more anyway) used
  a generic wait(NULL) to wait for a child to exit, but this can wind
  up waiting for the wrong pid in a multi-threaded or multi-fork environment.

* Solved by waiting on the specific pid instead.
lib/libc/net/rcmdsh.c