LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-23-2014, 01:28 PM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Rep: Reputation: 76
slackware 14.0: how is user input to console terminated (EOT)? Ctrl-D used to work.


What's said.
 
Old 10-23-2014, 01:36 PM   #2
genss
Member
 
Registered: Nov 2013
Posts: 741

Rep: Reputation: Disabled
bash won't acknowledge it if there are characters on the line
 
Old 10-23-2014, 01:46 PM   #3
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
What about linux programs that take input from console? The buffer must be first emptied by the program?

Last edited by stf92; 10-23-2014 at 01:48 PM.
 
Old 10-23-2014, 01:54 PM   #4
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,055

Rep: Reputation: Disabled
Ctrl-C then Ctrl-D

That should first kill any process in the foreground controlled by that console/tty/pty.

Of course you can type Ctrl-z then "bg" if want to keep the process running.

Last edited by Didier Spaier; 10-23-2014 at 01:59 PM.
 
Old 10-23-2014, 01:59 PM   #5
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
I see that is the case. "tr '\n' ' '" is immediately exits when typing ^D because it reads manual input very rapidly.
 
Old 10-23-2014, 02:01 PM   #6
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Quote:
Originally Posted by Didier Spaier View Post
Ctrl-C then Ctrl-D

That should first kill any process in the foreground controlled by that console/tty/pty.

Of course you can type Ctrl-z then "bg" if want to keep the process running.
But I did not want to send any signal in case of sendmail being the command in question. sendmail does not process the input and I lie there waiting not able to diagnose.
 
Old 10-23-2014, 02:03 PM   #7
genss
Member
 
Registered: Nov 2013
Posts: 741

Rep: Reputation: Disabled
Quote:
Originally Posted by stf92 View Post
What about linux programs that take input from console? The buffer must be first emptied by the program?
well.. depending on if the program uses a canonical or non-canonical mode on the stdin file

ctrl-d is EOF/EOT
so if you press is on an empty line, the next read() that program does will be of length 0

i think in non-canonical mode the EOF character (0x4) will be passed to the program
 
Old 10-23-2014, 02:09 PM   #8
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
I like to know what the behavior is for sendmail. Going back the title matter: in slackware 12.0 ^D irrevocably ended user console input. It never failed to terminate input.

Last edited by stf92; 10-23-2014 at 02:14 PM.
 
Old 10-23-2014, 03:39 PM   #9
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Instead of asking vague questions, tell us exactly what command is not accepting your Ctrl-D in Slackware 14.0 when it was working in earlier versions.

Or perhaps for your user account on this computer you have set ignoreeof? Then you need to enter Ctrl-D 10 times before it gets accepted by the shell.
(enabling ignoreeof is achieved by adding this to your .bashrc or .profile: "set -o ignoreeof")

Eric
 
Old 10-23-2014, 05:45 PM   #10
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Code:
bill@server:~$ set|grep ignoreeof
bill@server:~$
As to the vague questions... err, no, ^D, I only know I used to accidentally strike some keys and I recovered normal kb use with ^D while ^C had no effect in 12.0. Exactly the reverse is true in 14.0. See that fingers have a very precise memory, but cannot remember and exact command name.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] sed terminated prematurely by presence of \c in input porphyry5 Programming 3 06-17-2011 10:05 AM
How to scan user's input and output some stuff to the console at the same time? whepin Programming 4 06-05-2009 03:18 AM
in console Ctrl+Alt+F1 -> mouse does not work diegoandresalvarez Linux - Newbie 2 12-19-2007 10:03 AM
Ctrl+Shift Unicode input gone, after installing Japanese Input Methodes polemon Linux - Newbie 1 09-20-2005 05:17 PM
Howto disable user input on the console? jpan Programming 15 08-13-2004 01:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration