[cs631apue] HW3 - have to press return sometimes when daemon is running

Tejas Nadkarni tnadkarn at stevens.edu
Wed Oct 30 21:37:17 EDT 2013


So I figured out what's happening but I can't figure out how to work around
it.

Essentially the prompt is there but since my daemon is printing to stdout
there's no input to the shell so it's still waiting for input. This is why
hitting return gives you a new prompt. Here's an example:

$
IP -> message

IP2 -> message

IP -> message

_ <--- blinking cursor

So that cursor is for the $ prompt at the top. Is there anyway around this
or just have to live with this?



On Wed, Oct 30, 2013 at 9:30 PM, Tejas Nadkarni <tnadkarn at stevens.edu>wrote:

>
> One problem I've noticed though is although everything runs in the
> background on the server when I output text (after clients connect) or even
> right after running the program, I'm left at a flashing cursor but no shell
> prompt. However, if I hit return i get a shell prompt and everything
> continues to function. Any ideas and how I stop the need for hitting return
> to get back to prompt and what's causing this?
>
> I'm using daemon for my main network process and then forking children
> from that to handle connections. It all works except this part is odd.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.stevens.edu/pipermail/cs631apue/attachments/20131030/50e5b539/attachment.html>


More information about the cs631apue mailing list