lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 12 Aug 2007 17:00:18 +0100
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	Jan Engelhardt <jengelh@...putergmbh.de>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	linux-fsdevel@...r.kernel.org
Subject: Re: Finding out socket/pipe connectivity status

> when a pipe/socket is broken, the process trying to read/write to it 
> gets SIGPIPE. Is there a way to detect whether the next read/write will 
> trigger a SIGPIPE? select() does not seem helpful here.

select considers the broken pipe an error that needs reporting so it goes
ready. Processes that are network aware normally set SIGPIPE to SIG_IGN.
The default behaviour comes from a desire that non aware programs
shouldn't get stuck spinning on a network error but go away.

If you ignore the signal you'll get a event from select, and then an
error code.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ