Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Control C on HPUX

Help
2009-04-09
2013-05-02
  • Hello,

    I am new to expect but I seem to have found a strange problem. I hope somebody can help me with.

    I am attempting to send a 'control-C' via expect.
    My test needs to work on different Operating Systems.
    Currently I am using 'send \003' this works correctly on Solaris, Linux and AIX but it doesn't seem to work on HPUX. I have tested this on two different HPUX systems with the same result.

    Does anybody have an idea why this might be the case? Is there a better way to send a control-C? Or a unique way for HPUX ?

    Thanks

    Matthew

     
    • ender
      ender
      2009-04-10

      What gets captured when you use autoexpect to create a script that uses control-c?

       
    • My issue was with the HPUX terminal not remembering the setting for Control C

      I had to add the follow to the script.

      send -- 'stty intr <control-C>\r'

      You can type the <control-C> in vi with control-v then control-c.

      I hope this helps somebody in the future.