odd script(1) behavior - script bug, man bug, ?

Greg Troxel <[email protected]> Tue, 16 Dec 2025 08:42:42 -0500
Newsgroups gmane.os.netbsd.devel.userlevel
Message-ID <[email protected]>
In running bup regression tests, it basically does


  script -q -c "/path/to/bup/under/test some bup args" /dev/null

to ensure that the program is tested with a tty as input, separately
from just running it.

I have been running  the test suite "< /dev/null > CHECK.foo 2&1" more
or less.

This results in the top-level script exiting because no characters are
available on stdin, even though the program is still running.


So:

  Does script(1) (not specified by POSIX) require that stdin is a tty?

  Does it say that if there is EOF on stdin, then script should exit,
  whether or not the program being run has exited?

  Is this just a bug, that EOF on script stdin should lead to perceived
  EOF on the program being run's (pty) stdin?  And that script should
  only exit when the program exits?