bugFreeciv - Bugs: bug #18254, Server ignores input when run in...

 
 
Show feedback again

bug #18254: Server ignores input when run in screen

Submitted by:  Marko Lindqvist <cazfi>
Submitted on:  Tue 21 Jun 2011 09:38:43 AM UTC  
 
Category: generalSeverity: 3 - Normal
Priority: 5 - NormalStatus: Ready For Test
Assigned to: pepeto <pepeto>Open/Closed: Open
Release: Operating System: None
Planned Release: 2.4.4, 2.5.0, 2.6.0

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Wed 22 Oct 2014 04:40:30 PM UTC, comment #7:

Bug added at revision 14646 for PR#40225 (getline()).

The problem is that it is overwriting the value returned by read() [0 means EOF, -1 error]. Fix attached. You must turn off HAVE_LIBREADLINE to reproduce.

(file #22711, file #22712)

pepeto <pepeto>
Project MemberIn charge of this item.
Mon 03 Mar 2014 01:06:30 AM UTC, comment #6:

This message always appears to me anytime I enter a blank line in console. I first noticed this with 2.3.0, progressively up to the current 2.4.2. I don't know for releases before 2.3.0.

I never got in touch with a build not affected by this bug.

Debian 5 and 6; no Screen, only bg Bash process or nohup.

Davide Baldini <davide_at_debian>
Sun 02 Mar 2014 11:45:17 PM UTC, comment #5:

> I've only been able to provoke this message by typing Ctrl-D at
> the server prompt.

...on reflection, we should fix that. Bug #21743. Maybe a fix will also fix some of the stuff reported here.

Jacob Nevins <jtn>
Project Administrator
Sun 24 Jun 2012 09:29:36 PM UTC, comment #4:

I've only been able to provoke this message by typing Ctrl-D at the server prompt. I couldn't provoke it by just hitting Return, or by putting blank lines in .serv files.

Jacob Nevins <jtn>
Project Administrator
Fri 15 Jul 2011 04:17:47 PM UTC, comment #3:

Yes, I probably get the extra empty line from somewhere (IIRC I used "-r cazfi.serv", btw) and server interprets it so that stdin cannot be read at all. Don't know if there is any easy way to improve the way the check works.

Marko Lindqvist <cazfi>
Project Administrator
Fri 15 Jul 2011 04:10:38 PM UTC, comment #2:

Me too, I run freeciv 2.2.5 servers on Debian 5 inside screen, and everything works fine. I get that message "Server cannot read standard input. Ignoring input." only after I enter a blank line in stdin. BTW, I don't like that message too. KeyserSoze

Anonymous
Tue 28 Jun 2011 09:52:05 PM UTC, comment #1:

I can't reproduce (with screen 4.0.3-14ubuntu1.2 on Ubuntu Lucid). From inside a screen session, I do "screen server/freeciv-server" to start the server inside a new terminal, and it all seems to work fine for me. Trunk and S2_3, built with HAVE_LIBREADLINE.

Jacob Nevins <jtn>
Project Administrator
Tue 21 Jun 2011 09:38:43 AM UTC, original submission:

I wanted to run server in 'screen'.

As soon as I try to enter anything to server command line it says:
"Server cannot read standard input. Ignoring input."
and nothing can be done from command line.

Simply commenting out contents of handle_stdin_close() fixed this for my particular use-case.

Marko Lindqvist <cazfi>
Project Administrator

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by pepeto (Updated the item)
  • -unavailable- added by davide_at_debian (Posted a comment)
  • -unavailable- added by jtn (Posted a comment)
  • -unavailable- added by cazfi (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 22 Oct 2014 04:40:30 PM UTCpepetoAttached File-=>Added trunk_blank_line_dont_close_stdin.patch, #22711
      Attached File-=>Added S2_4_S2_5_blank_line_dont_close_stdin.patch, #22712
      CategoryNone=>general
      StatusNone=>Ready For Test
      Assigned toNone=>pepeto
      Planned Release=>2.4.4, 2.5.0, 2.6.0
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup