By the way, I just noticed that we have this full implementation of FIOASYNC from myechuri:
https://github.com/cloudius-systems/osv/issues/753 https://github.com/myechuri/osv/commit/df0c07a842a55baa1f6de1af155c7b69873c9eb6 It would probably be a good idea to take that instead of the stub (even though it's not really needed for nginx. but maybe for the multi-threaded one it is needed?) -- Nadav Har'El [email protected] On Tue, Jul 18, 2017 at 5:36 PM, Commit Bot <[email protected]> wrote: > From: Justin Cinkelj <[email protected]> > Committer: Nadav Har'El <[email protected]> > Branch: master > > af_local: stub ioctl FIOASYNC > > nginx doesn't start if ioctl with cmd=FIOASYNC fails. Stub it, so that > nginx can start unpatched. > > Signed-off-by: Justin Cinkelj <[email protected]> > Message-Id: <[email protected]> > > --- > diff --git a/libc/af_local.cc b/libc/af_local.cc > > --- a/libc/af_local.cc > +++ b/libc/af_local.cc > @@ -19,6 +19,8 @@ > #include <utility> > #include <sys/ioctl.h> > > +#include <osv/stubbing.hh> > + > using namespace std; > > struct af_local final : public special_file { > @@ -42,11 +44,17 @@ int af_local::ioctl(u_long cmd, void *data) > int error = ENOTTY; > switch (cmd) { > case FIONBIO: > - SCOPE_LOCK(f_lock); > - if (*(int *)data) > - f_flags |= FNONBLOCK; > - else > - f_flags &= ~FNONBLOCK; > + { > + SCOPE_LOCK(f_lock); > + if (*(int *)data) > + f_flags |= FNONBLOCK; > + else > + f_flags &= ~FNONBLOCK; > + } > + error = 0; > + break; > + case FIOASYNC: > + WARN_ONCE("af_local::ioctl(FIOASYNC) stubbed\n"); > error = 0; > break; > } > > -- > You received this message because you are subscribed to the Google Groups > "OSv Development" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "OSv Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
