linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* May close() return any error code?
@ 2015-07-29 10:46 Takashi Iwai
  2015-07-29 14:45 ` Dmitry Torokhov
  2015-08-02  7:42 ` Pavel Machek
  0 siblings, 2 replies; 7+ messages in thread
From: Takashi Iwai @ 2015-07-29 10:46 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-input, linux-kernel, Dr. Werner Fink

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-08-04 10:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-29 10:46 May close() return any error code? Takashi Iwai
2015-07-29 14:45 ` Dmitry Torokhov
2015-07-30 13:53   ` Takashi Iwai
2015-08-02 14:07   ` Al Viro
2015-08-04 10:21     ` Takashi Iwai
2015-08-02  7:42 ` Pavel Machek
2015-08-02 13:57   ` Al Viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).