Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Jul 2012 11:50:12 GMT
From:      Volodymyr Kostyrko <c.kworr@gmail.com>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/149857: [kqueue] kqueue not reporting EOF under certain circumstances
Message-ID:  <201207101150.q6ABoCun099922@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/149857; it has been noted by GNATS.

From: Volodymyr Kostyrko <c.kworr@gmail.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/149857: [kqueue] kqueue not reporting EOF under certain
 circumstances
Date: Tue, 10 Jul 2012 14:41:04 +0300

 This is a multi-part message in MIME format.
 --------------050400060102030803040405
 Content-Type: text/plain; charset=UTF-8; format=flowed
 Content-Transfer-Encoding: 7bit
 
 Hi all. Long time no see... :)
 
 Here's a C sample of the same code. I was wrong initially, kqueue 
 doesn't ignore EOF, it doesn't return it even if it was told to do so.
 
   Highlights:
 
   1. When feeding data through pipe kqueue reports EOF.
   2. When redirecting stdin from any file kqueue doesn't report EOF.
 
 -- 
 Sphinx of black quartz judge my vow.
 
 --------------050400060102030803040405
 Content-Type: text/plain; charset=UTF-8;
  name="test.c"
 Content-Transfer-Encoding: base64
 Content-Disposition: attachment;
  filename="test.c"
 
 I2luY2x1ZGUgPHN5cy90eXBlcy5oPgojaW5jbHVkZSA8c3lzL2V2ZW50Lmg+CiNpbmNsdWRl
 IDxzeXMvdGltZS5oPgojaW5jbHVkZSA8c3RkaW8uaD4KI2luY2x1ZGUgPHN0cmluZy5oPgoK
 ZXh0ZXJuIEZJTEUgKnN0ZGVyciwgKnN0ZGluLCAqc3Rkb3V0OwoKaW50IG1haW4odm9pZCkg
 ewoJaW50IGtxID0ga3F1ZXVlKCksIGtldnM7CglzdHJ1Y3Qga2V2ZW50IGtldjsKCWNoYXIg
 YnVmZmVyWzQwOTZdOwoKCWlmKGtxID09IC0xKSB7CgkJcGVycm9yKCJGYXRhbCBlcnJvcjog
 Y2FuJ3QgaW5pdGlhbGlzZSBrcXVldWUiKTsKCQlyZXR1cm4oMSk7Cgl9CgoJRVZfU0VUKCZr
 ZXYsIGZpbGVubyhzdGRpbiksIEVWRklMVF9SRUFELCBFVl9BREQgfCBFVl9FTkFCTEUgfCBF
 Vl9FT0YsIDAsIDAsIE5VTEwpOwoJa2V2cyA9IGtldmVudChrcSwgJmtldiwgMSwgTlVMTCwg
 MCwgTlVMTCk7CgoJZm9yICg7OykgewoJCWtldnMgPSBrZXZlbnQoa3EsIE5VTEwsIDAsICZr
 ZXYsIDEsIE5VTEwpOwoJCXByaW50ZigiJWQgJWxkICVkICVsZCAlZFxuIiwga2V2LmZpbHRl
 ciwga2V2LmRhdGEsIGtldi5mbGFncywga2V2LmlkZW50LCBrZXYuZmZsYWdzKTsKCQlpZihr
 ZXYuZmlsdGVyID09IEVWRklMVF9SRUFEKSB7CgkJCWlmKGtldi5kYXRhID4gMCkgewoJCQkJ
 aWYoIWZnZXRzKGJ1ZmZlciwga2V2LmRhdGEsIHN0ZGluKSkgewoJCQkJCXByaW50ZigiaW5w
 dXQgZmFpbGVkXG4iKTsKCQkJCX0KCQkJfQoJCQlpZihrZXYuZmxhZ3MgPj4gMTUgPT0gMSkg
 ewoJCQkJRVZfU0VUKCZrZXYsIGZpbGVubyhzdGRpbiksIEVWRklMVF9SRUFELCBFVl9ERUxF
 VEUsIDAsIDAsIE5VTEwpOwoJCQkJa2V2cyA9IGtldmVudChrcSwgJmtldiwgMSwgTlVMTCwg
 MCwgTlVMTCk7CgkJCQlyZXR1cm4oMCk7CgkJCX0KCQl9Cgl9CgoJcmV0dXJuKDApOwp9Cg==
 --------------050400060102030803040405--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207101150.q6ABoCun099922>