[Toybox] [PATCH] setsid(1): call setsid(2) before setpgrp(2).

Rob Landley rob at landley.net
Tue Apr 20 02:48:26 PDT 2021


On 4/20/21 3:23 AM, Yi-yo Chiang via Toybox wrote:
> Why do we need setsid in the new cpio testcase though?

Because without it TEST_HOST=1 calls the gnu/dammit cpio which does:

  $ cpio -i < /dev/null
  Found end of tape.  To continue, type device/file name when ready.

And then hangs waiting for you to hit enter after changing a nonexistent
reel-to-reel magnetic tape. The setsid breaks the association with /dev/tty so
opening it fails and thus cpio returns immediately.

(I.E. I have no idea how your previous for loop working around the TRAILER!!!
behavior ever worked. I'm guessing you never ran that script from a context with
a controlling tty?)

Rob



More information about the Toybox mailing list