OT What does RET (Enter) do and how does it do it ??
by Bill Case
Hi;
This question is meant as a Friday afternoon to a Sunday evening
discussion. It is not rush; but I have been unable to discover an answer
to what seems to me a basic question on how my computer works.
I have asked on my local LUG mailing list (which is usually quite good);
searched the following text books; "Modern Operating Systems", 2nd ed,
Andrew S. Tanenbaum; "Computer Organization & Architecture", 6th ed,
William Stallings; "The Linux Kernel Primer", Rodriguez, Fischer,
Smolski. I have done the usual google and Wikipedia. I mention the
above to indicate I am am willing to dig quite deeply for an answer.
Since I have been unable to find an answer, I might be able to conclude
I have mis-posed the question. That is why I am asking for your help,
pointing me to the correct answer or offering me enough of an
explanation, that I can begin to look in the right places.
Put simply:
1) If I am in any kind of text application, from emacs, vim to OOo
Writer, whenever I push RET the line of characters I have just typed
gets saved as a string literal the, "\n", new line character gets added
to the string array, and the cursor gets moved down to the beginning of
the next line. Of course, in the right circumstances within an
application (i.e. menu selection) push RET to get a sub-program or a
program module to run. (More questions in a moment)
2) If I am in a terminal at the command prompt and I type in a command,
whenever I push RET the command name I just typed gets executed. When
it is finished being executed I get a new command line prompt. Of
course, a executed program can take a string as an argument.
For 1) How does the context (i.e. that I am in a text program) get
established? Is there a context line at the start of the application?
Is it through main(argc, argv) or some such, depending on the
programming language of the application? How does it know to move one
line down on the screen i.e. is there a system call, a special
function ?
For 2) Again, how does the context (i.e. that I am in a terminal with a
command prompt) get established? Is there an exec() call or system call
to execute the program on pushing RET? How can stdin tell the
difference? Why does exec(), or its brethren (fork() etc), act one way
in one instance and another in the next instance? What is the command
that RET issues that starts, forks, calls or whatever a process or
program?
I suppose there is a simple answer; there should be. But I have been
having difficulty even explaining what I am asking. I usually get
answers of the kind "Of course it executes the command. You pushed RET"
As I said, maybe I am mis-posing the question. Maybe someone could help
me straighten the question out. Maybe someone can point me to an
answer. It can't be a new question.
--
Regards Bill
16 years, 9 months
(unused) floppy drive kernel errors
by Tim
Hi,
Almost every day I see the following warning in the logwatch mail:
> --------------------- Kernel Begin ------------------------
> WARNING: Kernel Errors Present
> end_request: I/O error, dev fd0, sector ...: 1 Time(s)
> ---------------------- Kernel End -------------------------
Which doesn't make any sense. Yes, I have a floppy drive. But, I don't
use it. There's no disk in the drive. And, as far as I'm aware, it
does actually work, fine. Not that I've got a disk to test it with, at
the moment.
Does anyone else get the same thing?
Looking through /var/log/messages, I see entries like these:
# grep fd0 /var/log/messages.1
Aug 21 09:14:24 localhost kernel: Floppy drive(s): fd0 is 1.44M
Aug 22 15:00:45 localhost kernel: Floppy drive(s): fd0 is 1.44M
Aug 22 17:42:59 localhost kernel: Floppy drive(s): fd0 is 1.44M
Aug 23 11:17:07 localhost kernel: Floppy drive(s): fd0 is 1.44M
Aug 23 11:34:25 localhost kernel: end_request: I/O error, dev fd0, sector 0
Aug 23 16:38:39 localhost kernel: Floppy drive(s): fd0 is 1.44M
Aug 23 18:30:21 localhost kernel: end_request: I/O error, dev fd0, sector 0
Aug 24 10:48:32 localhost kernel: Floppy drive(s): fd0 is 1.44M
Aug 24 16:25:01 localhost kernel: Floppy drive(s): fd0 is 1.44M
Aug 25 12:52:28 localhost kernel: Floppy drive(s): fd0 is 1.44M
Aug 25 13:25:53 localhost kernel: end_request: I/O error, dev fd0, sector 0
Aug 25 20:52:10 localhost kernel: Floppy drive(s): fd0 is 1.44M
Aug 26 13:37:40 localhost kernel: Floppy drive(s): fd0 is 1.44M
--
[tim@bigblack ~]$ uname -ipr
2.6.22.1-41.fc7 i686 i386
Using FC 4, 5, 6 & 7, plus CentOS 5. Today, it's FC7.
Don't send private replies to my address, the mailbox is ignored.
I read messages from the public lists.
16 years, 9 months
Small problem with ssh/know_hosts
by Steven W. Orr
I replaced a machine (pluto) and I made sure that the entry on both sides
for known_hosts for both src and dest were removed. When I try to go from
pluto to saturn there's no problem. But when I try to go from saturn to
pluto I get this warning every time. Pluto is Fedora 7 and saturn is Core
4 (if that matters).
543 > ssh pluto
Warning: the RSA host key for 'pluto' differs from the key for the IP
address '192.168.0.2'
Offending key for IP in /home/steveo/.ssh/known_hosts:1
Matching host key in /home/steveo/.ssh/known_hosts:23
Are you sure you want to continue connecting (yes/no)?
Anyone? :-(
--
Time flies like the wind. Fruit flies like a banana. Stranger things have .0.
happened but none stranger than this. Does your driver's license say Organ ..0
Donor?Black holes are where God divided by zero. Listen to me! We are all- 000
individuals! What if this weren't a hypothetical question?
steveo at syslang.net
16 years, 9 months
memory report discrepancy
by Dave Stevens
Hi,
I am running FC6 x86_64 on an ASUS socket 939 motherboard. I have installed
2x1g DDR2-400 chips and 2x512meg DDR2-400. This is a total of 3 gigs but I
consistently get a report of 2500 megs of installed RAM. Anyone able to
suggest why this is?
Dave
16 years, 9 months
Re: Repository
by Andrea Bencini
> This is the default Fedora repository and yum in Fedora already has it.
> The GPG key will be prompted when you install packages automatically.
Thank
Andrea
16 years, 9 months
configging ftp server
by Michael Klinosky
I'm trying to set up an ftp server (just temporarily). I'm using
pure-ftpd (on F7/gnome).
I'm sure that everything is in place. However, I can't figure out how to
log in. Actually, I haven't created ftp users - I was hoping that I
could log into an extant (standard) user. When I attempt to log in from
a machine on my lan, I get 'Login authentication failed'.
One big problem - some of the website seems to be offline. The main page
is http://www.pureftpd.org/project/pure-ftpd
Hit the 'Documentation' link in the upper right, the try to load
anything. :(
I configged pure-ftpd with:
# If you want to enable PAM authentication, uncomment the following line
# PAMAuthentication yes
# If you want simple Unix (/etc/passwd) authentication, uncomment this
UnixAuthentication yes
Then, as it states at the beginning of that config file, I ran its
utility to use this file. I also restarted pure-ftp and xinetd.
The log file (/var/log/pureftpd.log) is empty.
How do I conf pure-ftpd to log into a regular user?
Furthermore, I found this in the message log:
Aug 25 10:30:05 d500 setroubleshoot: SELinux is preventing the ftp
daemon from writing files outside the home directory (pure-ftpd).
I checked the SElinux log, and it gave a command to allow this.
However -
[root@d500 pure-ftpd]# setsebool -P allow_ftpd_full_access=1
Could not change policy booleans
How can I fix this?
16 years, 9 months
getting 2 different kernel-headers when I try to install kernel-headers
by Darlene Wallach
yum list updates only lists one kernel-header, the
one for 2.6.22.4-65.fc7.
However when I try to install, I get two kernel-headers
kernel-headers.i386 0:2.6.21-1.3194.fc7
kernel-headers.i386 0:2.6.22.4-65.fc7
# yum list updates
kernel-headers.i386 2.6.22.4-65.fc7 updates
# yum install kernel-headers.i386
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package kernel-headers.i386 0:2.6.21-1.3194.fc7 set to be updated
---> Package kernel-headers.i386 0:2.6.22.4-65.fc7 set to be updated
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
kernel-headers i386 2.6.21-1.3194.fc7 fedora 658 k
kernel-headers i386 2.6.22.4-65.fc7 updates 658 k
Transaction Summary
=============================================================================
Install 2 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 1.3 M
Is this ok [y/N]: y
Downloading Packages:
(1/1): kernel-headers-2.6 100% |=========================| 658 kB
00:04
Running rpm_check_debug
--> Populating transaction set with selected packages. Please wait.
---> Package kernel-headers.i386 0:2.6.21-1.3194.fc7 set to be installed
---> Package kernel-headers.i386 0:2.6.22.4-65.fc7 set to be installed
Running Transaction Test
Finished Transaction Test
Transaction Check Error:
file /usr/include/linux/netfilter_ipv4/ipt_iprange.h from install of
kernel-headers-2.6.22.4-65.fc7 conflicts with file from package
kernel-headers-2.6.22.1-41.fc7
Error Summary
-------------
How can I get kernel-headers.i386 0:2.6.21-1.3194.fc7
to not get listed or to be installed. It seems one
would overwrite the other. Though this still doesn't
fix the "Transaction Check Error" problem.
Darlene Wallach
16 years, 9 months
error when installing kernel and kernel-headers 2.6.22.4-65.fc7
by Darlene Wallach
# yum list updates
Updated Packages
kernel.i686 2.6.22.4-65.fc7 updates
kernel-headers.i386 2.6.22.4-65.fc7 updates
kernel-xen.i686 2.6.20-2931.fc7 updates
When I try
# yum install kernel.i686 kernel-headers.i386 kernel-xen.i686
Transaction Check Error:
file /usr/include/linux/netfilter_ipv4/ipt_iprange.h from install of
kernel-headers-2.6.22.4-65.fc7 conflicts with file from package
kernel-headers-2.6.22.1-41.fc7
I renamed /usr/include/linux/netfilter_ipv4/ipt_iprange.h
and I still get the same "Transaction Check Error:"
Is anyone else getting this error? Is there something
wrong with kernel-headers-2.6.22.4-65.fc7 or is it
fixing a problem with kernel-headers-2.6.22.1-41.fc7?
I googled
"ipt_iprange.h from install of kernel-headers-2.6.22.4-65.fc7 conflicts
with file from package kernel-headers-2.6.22.1-41.fc7"
and got no match.
Any suggestions?
Thank you for your attention,
Darlene Wallach
16 years, 9 months