lkml.org 
[lkml]   [2015]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectMay close() return any error code?
Hi,

while debugging a problem of X and gdm with the old systemd-210, we
encountered a sudden death of systemd-logind, and this turned out to
be an unexpected errno from close(). The close() call for input
devices returns ENODEV error. The logind in systemd-210 treats this
error code as fatal, triggers assert() and eventually kills itself.
The details are found in an openSUSE bugzilla thread:
https://bugzilla.opensuse.org/show_bug.cgi?id=939571

This seems coming from evdev_flush(). As there is no fd leak, it's no
big problem per se. But, now the question is whether returning such
an error code is correct behavior at all. At least, it doesn't seem
defined in POSIX:
http://pubs.opengroup.org/onlinepubs/009695399/functions/close.html

I myself have no strong opinion here, so would like just to ask others
suggestions / comments.

thanks,


Takashi


\
 
 \ /
  Last update: 2015-07-29 21:11    [W:0.064 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site