#4 A patch to fix a spawn read bug

open
None
7
2002-10-15
2002-10-15
H.J. Lu
No

Please see

http://gcc.gnu.org/ml/gcc/2002-10/msg00804.html

for links to the detailed bug descriptions.

Discussion

  • H.J. Lu

    H.J. Lu - 2002-10-15

    A patch

     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2002-10-15

    Logged In: YES
    user_id=72656

    This should be verified against the latest sources and then
    applied (assuming no conflicts).

     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2002-10-15
    • priority: 5 --> 7
    • assigned_to: nobody --> andreas_kupries
     
  • H.J. Lu

    H.J. Lu - 2002-10-15

    Logged In: YES
    user_id=10

    The patch was generated against today's CVS. However, I
    haven't built it since
    it has to be built in the combined tcl/expect tree. I can
    give it a try.

     
  • Andreas Kupries

    Andreas Kupries - 2002-10-16

    Logged In: YES
    user_id=75003

    Please do.

     
  • H.J. Lu

    H.J. Lu - 2002-10-19

    Logged In: YES
    user_id=10

    I rebuilt expect 5.38.0 with my patch on RedHat 7.3.
    Everything seems to work fine.

     
  • Andreas Kupries

    Andreas Kupries - 2002-10-21

    Logged In: YES
    user_id=75003

    Good. Still, 'seems' is a bit vague. I guess it is passing the
    testsuite, and your own application does behave well now. Is
    this guess true ?

    Also, is it possible to condense your problem into a new
    testcase we can add to the testsuite ? Failing for expect
    without, and passing with the patch applied ?

     
  • H.J. Lu

    H.J. Lu - 2002-10-21

    Logged In: YES
    user_id=10

    You are right.

    I guess you can extract a testcase based on my
    RedHat bug report. But I am afraid I don't have
    the time to send you one.

     
  • Andreas Kupries

    Andreas Kupries - 2002-10-25

    Logged In: YES
    user_id=75003

    I asked Don Libes to review your patch.
    Enclosed his answer:

    -----
    I do not find that bug report convincing (and the code appears
    to be solving a non-problem; Expect isn't line-oriented to
    begin but the code clearly believes it is). In any case, the
    simple example he showed that fails could be due to pty
    behavior warned about in the expect man page:

    Some implementations of ptys are designed so that the
    kernel
    throws away any unread output after 10 to 15 seconds
    (actual
    number is implementation-dependent) after the process
    has
    closed the file descriptor. Thus Expect programs such as

    spawn date
    sleep 20
    expect

    will fail. To avoid this, invoke non-interactive programs
    with exec rather than spawn. While such situations are
    con-
    ceivable, in practice I have never encountered a situation
    in which the final output of a truly interactive program
    would be lost due to this behavior.

    Don

     

Log in to post a comment.