[Konsole-devel] [Bug 105824] ctrl-d doesn't always work
gdamjan at mail.net.mk
gdamjan at mail.net.mk
Thu Jul 13 01:09:29 UTC 2006
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=105824
------- Additional Comments From gdamjan mail net mk 2006-07-13 03:09 -------
And, here it is again... I was playing widly with console, opening and closing sessions, and it happened again. I have made this simplest C program that just reads one byte from stdin and dumps the char in HEX:
/* test.c, compile with gcc test.c -o test */
#include <stdio.h>
int main(){
char buf[10];
int i;
while(1) {
i = read(0, buf, 1);
printf("i = %d; buf = 0x%02x\n", i, buf[0]);
}
}
So I have this konsole window on my desktop, where:
- pressing CTRL-D in any session, new or old, local or remote IS NOT received by the application inside konsole
- I tried running 'exec ./test' (the program from above), it doesn't recognise that CTRL-D is pressed, while at the same time in other konsole windows (separate processes) and in Xterm it shows:
i = 0; buf = 0xffffff91
- running strace on the "weird" konsole it shows this when CTRL-D is pressed
lstat64("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/home/damjan", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/home/damjan/.kde", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
lstat64("/home/damjan/.kde/share", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
lstat64("/home/damjan/.kde/share/apps", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
lstat64("/home/damjan/.kde/share/apps/konsole", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
lstat64("/home/damjan/.kde/share/apps/konsole/bookmarks.xml.tbcache", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
access("/home/damjan/.kde/share/apps/konsole/bookmarks.xml.tbcache", W_OK) = 0
open("/home/damjan/.kde/share/apps/konsole/bookmarks.xml.tbcache02F18b.new", O_RDWR|O_CREAT|O_EXCL, 0600) = 11
umask(0) = 022
umask(022) = 0
fchmod(11, 0644) = 0
getgid32() = 100
getuid32() = 1000
fchown32(11, 1000, 100) = 0
fcntl64(11, F_SETFD, FD_CLOEXEC) = 0
stat64("/home/damjan/.kde/share/apps/konsole/bookmarks.xml.tbcache", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
getuid32() = 1000
getgid32() = 100
fchmod(11, 0100644) = 0
fcntl64(11, F_GETFL) = 0x2 (flags O_RDWR)
fstat64(11, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xa76d6000
_llseek(11, 0, [0], SEEK_CUR) = 0
fstat64(11, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
read(11, "", 4096) = 0
fdatasync(11) = 0
close(11) = 0
munmap(0xa76d6000, 4096) = 0
rename("/home/damjan/.kde/share/apps/konsole/bookmarks.xml.tbcache02F18b.new", "/home/damjan/.kde/share/apps/konsole/bookmarks.xml.tbcache") = 0
BUT this doesn't happen in a konsole process that's normal (not in the weird state).
More information about the konsole-devel
mailing list