Re: Where does the "prompt come from"

From: all mail refused (elvis_at_notatla.org.uk)
Date: 03/25/04

  • Next message: Per Hedeland: "Re: Where does the "prompt come from""
    Date: 25 Mar 2004 22:14:14 GMT
    
    

    In article <c3s3b1$nf$1@newstree.wise.edt.ericsson.se>, Niclas Bäckman wrote:

    >stdin/stdout/stderr from the ssh binary to a socket, and we then
    >perform socket read/writes directly into the ssh tunnel. But when i perform
    >a command, the prompt is never read up from the server.
    >So it's difficult to know when a remote script is finished. Using the same
    >solution but towards a telnet server always results in a prompt
    >back to the client.
    >
    >I would be most greatful for any good ideas/hints in this case.

    You can get the same when you overflow a buffer on a remote
    program [1] and execute a non-login shell. A simple workaround is to
    enter every command as
        do_some -thing ; echo :::
    and use the ":::" as a completion sign to the client program.

    Really you want to investigate the conditions in which your shell
    is running. Have a dig round in /proc for a problem shell and
    a normal one to compare it to.

    1. With permission of course.

    -- 
    Elvis Notargiacomo  master AT barefaced DOT cheek
    

  • Next message: Per Hedeland: "Re: Where does the "prompt come from""

    Relevant Pages

    • Re: term emulation detecting the end of remote send
      ... It's because shell sessions of this type are not really intended to ... be processed by machines. ... and a human knows when they've seen the prompt partly ... SSH protocol has a robust mechanism for sending a single command, ...
      (comp.terminals)
    • Re: expect - problem split argv 0, then send each item as command
      ... Actually you're touching on a more general question of is it possible for what you're trying to do to work in the presence of a user who has set the prompt strings for their shell? ... Parameter, command and arithmetic substitutions are performed, and! ... You can tell the shell not to count certain sequences by prefixing your prompt with a non-printing character followed by a carriage return and then delimiting the escape codes with this non-printing character. ...
      (comp.lang.tcl)
    • Re: Whats the point of the shell choice in single user mode?
      ... then gave me a "simple shell" with a % prompt. ... I just tried it again with exactly the same results (FreeBSD-7.0 beta3): ... mount: Command not found ...
      (freebsd-questions)
    • Re: changing the shell prompt
      ... This will display who you are logged in as and the name of the ... indicates the shell is interactive. ... here's the prompt I use with bash: ... command which does nothing, you can paste the entire line to repeat ...
      (comp.unix.solaris)
    • Bash-4.0 available for FTP
      ... Unlike previous bash distributions, this tar file includes the formatted ... The shell has been changed to be more ... rigorous about parsing commands inside command substitutions, ... Changes have been made to the Readline library being released at ...
      (gnu.announce)