Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Apr 2003 19:01:34 -0700 (PDT)
From:      Kelly Yancey <kelly@nttmcl.com>
To:        arch@freebsd.org
Subject:   kqueue's EVFILT_PROC and unreaped children
Message-ID:  <20030410184538.U57246-200000@alicia.nttmcl.com>

next in thread | raw e-mail | index | archive | help
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--0-473914763-1050026494=:57246
Content-Type: TEXT/PLAIN; charset=US-ASCII


  The attached patch, against -STABLE, closes a window where a process
can fork/exec a child and then register a NOTE_EXIT note for the child
only to get ESRCH even if the child is still a zombie. Conceivably,
something similar should be done for NOTE_EXEC, but I don't know a simple
way to do that (I'm not saying there isn't one...just that I don't know it
:) ).

  Anyway, I'de appreciate feedback before I adapt the patch to -CURRENT
and commit.  Thanks,

  Kelly

--
Kelly Yancey -- kbyanc@{posi.net,FreeBSD.org} -- kelly@nttmcl.com

--0-473914763-1050026494=:57246
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="kqueue-proc.diff"
Content-Transfer-Encoding: BASE64
Content-ID: <20030410190134.A57246@alicia.nttmcl.com>
Content-Description: 
Content-Disposition: attachment; filename="kqueue-proc.diff"

SW5kZXg6IHN5cy9rZXJuL2tlcm5fZXZlbnQuYw0KPT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PQ0KUkNTIGZpbGU6IC9ob21lL25jdnMvc3JjL3N5cy9rZXJuL2tl
cm5fZXZlbnQuYyx2DQpyZXRyaWV2aW5nIHJldmlzaW9uIDEuMi4yLjgNCmRp
ZmYgLXUgLXAgLXIxLjIuMi44IGtlcm5fZXZlbnQuYw0KLS0tIHN5cy9rZXJu
L2tlcm5fZXZlbnQuYwkxNCBEZWMgMjAwMSAxOToyNDo0MiAtMDAwMAkxLjIu
Mi44DQorKysgc3lzL2tlcm4va2Vybl9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o9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09DQpSQ1MgZmlsZTogL2hvbWUvbmN2
cy9zcmMvc3lzL3N5cy9wcm9jLmgsdg0KcmV0cmlldmluZyByZXZpc2lvbiAx
Ljk5LjIuNw0KZGlmZiAtdSAtcCAtcjEuOTkuMi43IHByb2MuaA0KLS0tIHN5
cy9zeXMvcHJvYy5oCTMxIEphbiAyMDAyIDE4OjQwOjI5IC0wMDAwCTEuOTku
Mi43DQorKysgc3lzL3N5cy9wcm9jLmgJMTAgQXByIDIwMDMgMjM6NTA6NTUg
LTAwMDANCkBAIC0zNiw3ICszNiw3IEBADQogICogU1VDSCBEQU1BR0UuDQog
ICoNCiAgKglAKCMpcHJvYy5oCTguMTUgKEJlcmtlbGV5KSA1LzE5Lzk1DQot
ICogJEZyZWVCU0QkDQorICogJEZyZWVCU0Q6IHNyYy9zeXMvc3lzL3Byb2Mu
aCx2IDEuOTkuMi43IDIwMDIvMDEvMzEgMTg6NDA6MjkgZGlsbG9uIEV4cCAk
DQogICovDQogDQogI2lmbmRlZiBfU1lTX1BST0NfSF8NCkBAIC00MTcsNiAr
NDE3LDcgQEAgZXh0ZXJuCXVfbG9uZyBwc19hcmdfY2FjaGVfbGltaXQ7DQog
ZXh0ZXJuCWludCBwc19hcmdzb3BlbjsNCiANCiBzdHJ1Y3QgcHJvYyAqcGZp
bmQgX19QKChwaWRfdCkpOwkvKiBGaW5kIHByb2Nlc3MgYnkgaWQuICovDQor
c3RydWN0IHByb2MgKnpwZmluZCBfX1AoKHBpZF90KSk7CS8qIEZpbmQgem9t
YmllIHByb2Nlc3MgYnkgaWQuICovDQogc3RydWN0IHBncnAgKnBnZmluZCBf
X1AoKHBpZF90KSk7CS8qIEZpbmQgcHJvY2VzcyBncm91cCBieSBpZC4gKi8N
CiANCiBzdHJ1Y3Qgdm1fem9uZTsNCg==
--0-473914763-1050026494=:57246--



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