[arch-general] Seemingly archlinux specific problem with logkeys
I started a topic on the forum, but we didnt reach to any solution: https://bbs.archlinux.org/viewtopic.php?id=129528 In hope for a more competent audience, I repost my question now here: It looks like there is an archlinux specific problem with logkeys: http://code.google.com/p/logkeys/issues/detail?id=60 I also am hit by this, and would like to ask for your help guys. Any idea what could cause this? In a nutshell: strace -f logkeys -s shows that the logfile could not be written for some reason: [pid 10516] write(1, "Logging started ...\n\n2011-11-02 "..., 48) = -1 EBADF (Bad file descriptor) The comments all have in common that they use archlinux, hence I dared to post here.
On 01/04/2012 06:33 AM, SanskritFritz wrote:
I started a topic on the forum, but we didnt reach to any solution: https://bbs.archlinux.org/viewtopic.php?id=129528
In hope for a more competent audience, I repost my question now here:
It looks like there is an archlinux specific problem with logkeys: http://code.google.com/p/logkeys/issues/detail?id=60 I also am hit by this, and would like to ask for your help guys. Any idea what could cause this? In a nutshell:
strace -f logkeys -s shows that the logfile could not be written for some reason: [pid 10516] write(1, "Logging started ...\n\n2011-11-02 "..., 48) = -1 EBADF (Bad file descriptor)
The comments all have in common that they use archlinux, hence I dared to post here.
Huh. logkeys apparently does some stunny fuff with stdout (stdout=freopen(fname, "a", stdout) instead of just fopen'ing a new file) - changing that to be more "normal" fixes the problem for me. Attached is my patch for this. (I'll also stick it on the issue tracker.) -- Scott Lawrence
On Wed, Jan 04, 2012 at 07:03:56AM -0500, Scott Lawrence wrote:
On 01/04/2012 06:33 AM, SanskritFritz wrote:
I started a topic on the forum, but we didnt reach to any solution: https://bbs.archlinux.org/viewtopic.php?id=129528
In hope for a more competent audience, I repost my question now here:
It looks like there is an archlinux specific problem with logkeys: http://code.google.com/p/logkeys/issues/detail?id=60 I also am hit by this, and would like to ask for your help guys. Any idea what could cause this? In a nutshell:
strace -f logkeys -s shows that the logfile could not be written for some reason: [pid 10516] write(1, "Logging started ...\n\n2011-11-02 "..., 48) = -1 EBADF (Bad file descriptor)
The comments all have in common that they use archlinux, hence I dared to post here.
Huh. logkeys apparently does some stunny fuff with stdout (stdout=freopen(fname, "a", stdout) instead of just fopen'ing a new file) - changing that to be more "normal" fixes the problem for me. Attached is my patch for this. (I'll also stick it on the issue tracker.)
Yeah, I verified the issue and came to the same conclusion. Re-assigning stdout that way is not supposed to happen, and seemingly unnecessary, too. To actually add something to the discussion, please find my fixed PKGBUILD and patch for ABS attached. It's basically the same as Scott's with minor stylistic differences. Regards, Dennis -- "Den Rechtsstaat macht aus, dass Unschuldige wieder frei kommen." Dr. Wolfgang Schäuble, Bundesinnenminister (14.10.08, TAZ-Interview) 0D21BE6C - F3DC D064 BB88 5162 56BE 730F 5471 3881 0D21 BE6C
On Wed, Jan 4, 2012 at 1:34 PM, Dennis Herbrich <dennis@archlinux.org> wrote:
On Wed, Jan 04, 2012 at 07:03:56AM -0500, Scott Lawrence wrote:
Huh. logkeys apparently does some stunny fuff with stdout (stdout=freopen(fname, "a", stdout) instead of just fopen'ing a new file) - changing that to be more "normal" fixes the problem for me. Attached is my patch for this. (I'll also stick it on the issue tracker.)
Yeah, I verified the issue and came to the same conclusion. Re-assigning stdout that way is not supposed to happen, and seemingly unnecessary, too.
To actually add something to the discussion, please find my fixed PKGBUILD and patch for ABS attached. It's basically the same as Scott's with minor stylistic differences.
Guys, you rock, thank you. The maintainer already applied the patch in the svn, I recompiled logkeys-svn, and presto logkeys works, finally. Thanks again.
participants (3)
-
Dennis Herbrich
-
SanskritFritz
-
Scott Lawrence