Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
10-23-2014, 01:28 PM
|
#1
|
Senior Member
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442
Rep:
|
slackware 14.0: how is user input to console terminated (EOT)? Ctrl-D used to work.
What's said.
|
|
|
10-23-2014, 01:36 PM
|
#2
|
Member
Registered: Nov 2013
Posts: 744
Rep:
|
bash won't acknowledge it if there are characters on the line
|
|
|
10-23-2014, 01:46 PM
|
#3
|
Senior Member
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442
Original Poster
Rep:
|
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.
|
|
|
10-23-2014, 01:54 PM
|
#4
|
LQ Addict
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,172
Rep:
|
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.
|
|
|
10-23-2014, 01:59 PM
|
#5
|
Senior Member
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442
Original Poster
Rep:
|
I see that is the case. "tr '\n' ' '" is immediately exits when typing ^D because it reads manual input very rapidly.
|
|
|
10-23-2014, 02:01 PM
|
#6
|
Senior Member
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442
Original Poster
Rep:
|
Quote:
Originally Posted by Didier Spaier
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.
|
|
|
10-23-2014, 02:03 PM
|
#7
|
Member
Registered: Nov 2013
Posts: 744
Rep:
|
Quote:
Originally Posted by stf92
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
|
|
|
10-23-2014, 02:09 PM
|
#8
|
Senior Member
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442
Original Poster
Rep:
|
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.
|
|
|
10-23-2014, 03:39 PM
|
#9
|
Slackware Contributor
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559
|
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
|
|
|
10-23-2014, 05:45 PM
|
#10
|
Senior Member
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442
Original Poster
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 06:42 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|