Thread: Program's console output being interrupted, strange messages instead?

  1. #1
    Registered User
    Join Date
    Jul 2014
    Posts
    15

    Program's console output being interrupted, strange messages instead?

    I am wrapping up a Linux/C programming assignment that requires several small programs for encrypting and decrypting text. There is a bash grading script which will be used to assess the performance of my programs. The script runs fine on my local machine and all of my tests pass, but when I run everything on my University's server via SSH, the script is not behaving the same. I am fairly certain the error exists somewhere in my C code, because no other students are having this issue. The 4 main programs consist of 2 daemons which wait for clients to connect via sockets, and the two clients. There is a daemon/client pair for handling encryption, and another for handling decryption.

    Here is a screenshot of the test script output on my local machine:

    Program's console output being interrupted, strange messages instead?-local-png

    And here is a screenshot of what happens with the same files on the remote server:

    Program's console output being interrupted, strange messages instead?-putty-png

    As you can see, in the 4th and 5th tests (where the program's output should read), it's instead showing "ssIgnore this message". In later tests (not pictured) there is another message that reads "ddServer to client message". This text appears nowhere in my code or the grading script, so it must be server-side. I'm going to hold off on posting code at the moment, in the hopes that someone might be able to help me narrow down the issue-- at this stage I'd be posting entire programs and that's not very efficient. Thanks!

  2. #2
    Registered User rstanley's Avatar
    Join Date
    Jun 2014
    Location
    New York, NY
    Posts
    1,111
    In a C Programming Language forum, you have provided some screen shots of the output of a bash script, that run several C applications..

    How can we debug the source code that, as you say

    ... I'm going to hold off on posting code at the moment ...
    ???

    We can't see the bash script. We don't know how it calls the applications, with what command line arguments. We don't know how the applications were coded. We don't know what shared libraries might be called. We don't know what Distros run on the two systems, and what versions of those Distros. (Or even if the University's server is running Linux, or UNIX!) etc...

    ... in the hopes that someone might be able to help me narrow down the issue ...
    Sure, no problem!!! The answer is ...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. string interrupted when there is a space
    By nerio in forum C Programming
    Replies: 3
    Last Post: 07-21-2011, 04:07 PM
  2. Encrypting messages in the binary and the output???
    By razor in forum C Programming
    Replies: 5
    Last Post: 06-09-2011, 11:50 AM
  3. Interrupted System Call
    By Seiki in forum C Programming
    Replies: 2
    Last Post: 01-28-2009, 11:55 PM
  4. Strange gcc warning messages with derived classes
    By skewray in forum C++ Programming
    Replies: 5
    Last Post: 09-23-2007, 04:46 AM
  5. Strange output ---need help
    By jack_2205 in forum C Programming
    Replies: 7
    Last Post: 02-21-2002, 07:07 PM