Thanks. One question below: On Tue, Jul 18, 2017 at 12:16 PM, Justin Cinkelj <justin.cink...@xlab.si> wrote:
> nginx doesn't start if ioctl with cmd=FIOASYNC fails. Stub it, so that > nginx can start unpatched. > > Signed-off-by: Justin Cinkelj <justin.cink...@xlab.si> > --- > libc/af_local.cc | 18 +++++++++++++----- > 1 file changed, 13 insertions(+), 5 deletions(-) > > diff --git a/libc/af_local.cc b/libc/af_local.cc > index b68c2b0..e65e2b1 100644 > --- 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; > + } > Why did you need to change this? did SCOPE_LOCK not work inside a "case", so you needed to add this extra scope? > + error = 0; > + break; > + case FIOASYNC: > + WARN_ONCE("af_local::ioctl(FIOASYNC) stubbed\n"); > I'm surprised nginx needed this in AF_LOCAL (i.e., unix domain sockets), not on normal TCP/IP sockets. All the more reason to think it is't important :-) > error = 0; > break; > } > -- > 2.9.4 > > -- > 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 osv-dev+unsubscr...@googlegroups.com. > 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 osv-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.