console-client: Produce unique exit code when escaped

This allows programs which supervise obmc-console-client to know the
difference between a clean exit and one where the shell had a deliberate
escape.

Tested:
    Ran on a machine and checked that issuing an escape generated a
    return code of 2.

Change-Id: Ica698134f60ba17b445c12b9c95faed43f90f309
Signed-off-by: William A. Kennington III <wak@google.com>
1 file changed
tree: 2b50ae18e7b941a9466f705c1ffea1dbed90c496
  1. test/
  2. .gitignore
  3. .travis.yml
  4. bootstrap.sh
  5. config.c
  6. configure.ac
  7. console-client.c
  8. console-server.c
  9. console-server.h
  10. console-socket.c
  11. LICENSE
  12. log-handler.c
  13. MAINTAINERS
  14. Makefile.am
  15. obmc-console.conf.sample
  16. README.md
  17. ringbuffer.c
  18. socket-handler.c
  19. tty-handler.c
  20. util.c
README.md

To Build

Note: In addition to a toolchain and autoconf tools, this requires autotools-archive to be installed.

To build this project, run the following shell commands:

./bootstrap.sh
./configure ${CONFIGURE_FLAGS}
make

To fully clean the repository, run:

./bootstrap.sh clean

To Run Server

Running the server requires a serial port (e.g. /dev/ttyS0):

touch obmc-console.conf
./obmc-console-server --config obmc-console.conf ttyS0

To Connect Client

To connect to the server, simply run the client:

./obmc-console-client

To disconnect the client, use the standard ~. combination.