Skip to content

Instantly share code, notes, and snippets.

@hnsl
Created October 20, 2014 18:02
Show Gist options
  • Save hnsl/397e9f318cd6da04f160 to your computer and use it in GitHub Desktop.
Save hnsl/397e9f318cd6da04f160 to your computer and use it in GitHub Desktop.
*** Terminal A: ***
$> ./build/debug
*** Terminal B: ***
$> nc 127.0.0.1 2134
enter numbers to sum, separate with new line, end with empty line:
1
1
the result is: 2
$> nc 127.0.0.1 2134
enter numbers to sum, separate with new line, end with empty line:
100
25
39
the result is: 164
$> nc 127.0.0.1 2134
enter numbers to sum, separate with new line, end with empty line:
x
got invalid character [x]
*** Terminal A: ***
i/o exception in session:
io type exception at [/home/user/projects/librcd-exceptions-example/src/exceptions.c:24]
message: got invalid character [x]
backtrace:
#0: 0x400bb1 handle_session in exceptions.c:24 [^s]
#1: 0x400e34 rcd_main in exceptions.c:44 [^s]
#2: 0x44a1ae _lwt_program_main in lwthreads.c:1852 [^s] [.s]
*** Terminal B: ***
$> ./build/debug
FATAL EXCEPTION CRASH:
io type exception at [/home/user/projects/librcd-exceptions-example/src/exceptions.c:49]
message: Server crash! :(
backtrace:
#0: 0x400dd6 rcd_main in exceptions.c:49 [^s]
#1: 0x44a1ae _lwt_program_main in lwthreads.c:1852 [^s] [.s]
forwards inner exception:
io (syscall_eio) type exception at [/home/user/projects/librcd/src/linux.c:995]
errno_v=98
message: bind() failed with errno 98 (Address already in use)
backtrace:
#0: 0x488b88 _rcd_syscall_exception in linux.c:995 [^s]
#1: 0x472720 rio_tcp_server in rio.c:1652 [^s]
#2: 0x400dfa rcd_main in exceptions.c:40 [^s]
#3: 0x44a1ae _lwt_program_main in lwthreads.c:1852 [^s] [.s]
fish: Job 1, “./build/debug ” terminated by signal SIGABRT (Abort)
$>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment