Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Jan 2012 18:25:42 -0500
From:      Eitan Adler <lists@eitanadler.com>
To:        Kostik Belousov <kostikbel@gmail.com>
Cc:        jilles@freebsd.org, FreeBSD Hackers <freebsd-hackers@freebsd.org>, Colin Percival <cperciva@freebsd.org>
Subject:   Re: dup3 syscall - atomic set O_CLOEXEC with dup2
Message-ID:  <CAF6rxg=Xbh--nL3pebj=ra%2B09K%2BWJYen2JPVDWwR14%2BifG-_iQ@mail.gmail.com>
In-Reply-To: <CAF6rxgn5uddFb4LOGb0E_OOpVMiFavOVHwnrKF7cFHb6tfrPjw@mail.gmail.com>
References:  <CAF6rxg=EjkwFbXQt3i2Nnz6_dcZtdek-2YdqyZnAdVPxVaWR_Q@mail.gmail.com> <20120112100840.GV31224@deviant.kiev.zoral.com.ua> <CAF6rxgne7M9xBb-mM1xsjPy3r-O%2BO%2BMzuYrsweG849V83MX3mA@mail.gmail.com> <CAF6rxgn5uddFb4LOGb0E_OOpVMiFavOVHwnrKF7cFHb6tfrPjw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
SSBmaWd1cmUgdGhpcyBpc24ndCB3YW50ZWQ/CgpPbiBUaHUsIEphbiAxMiwgMjAxMiBhdCAxMDow
NyBQTSwgRWl0YW4gQWRsZXIgPGxpc3RzQGVpdGFuYWRsZXIuY29tPiB3cm90ZToKPiBPa2F5IC0g
aGVyZSBpcyB2ZXJzaW9uIDIgKGNvbXBpbGUgYW5kIHJ1biB0ZXN0ZWQpCj4KPiBJbmRleDogc3lz
L2tlcm4va2Vybl9kZXNjcmlwLmMKPiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Cj4gLS0tIHN5cy9rZXJuL2tlcm5fZGVz
Y3JpcC5jIMKgIMKgIChyZXZpc2lvbiAyMjk4MzApCj4gKysrIHN5cy9rZXJuL2tlcm5fZGVzY3Jp
cC5jIMKgIM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