Coder Social home page Coder Social logo

socklog's People

Contributors

jprjr avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

doytsujin 0x1a0b

socklog's Issues

Command Line arguments don't get parsed correctly

Most recent skalibs requires -DSUBGETOPT_SHORT=1 otherwise optind will reference the built-in libc getopt optind variable, NOT the redefined one.

As evidenced by gcc -E

  while ((opt = sgetopt_r((argc), ((char const *const *)argv), ("rRUV"), &subgetopt_here)) != -1) {
    switch(opt) {
    case 'r': lograw =1; break;
    case 'R': lograw =2; break;
    case 'U': noumask =1; break;
    case 'V':
      err("$Id: socklog.c,v 1.18 2004/06/26 09:36:25 pape Exp $", 0, 0);
      buffer_putsflush((&buffer_2_), "\n\n");

    case '?': usage();
    }
  }
  argv +=optind;

VS gcc -E -DSUBGETOPT_SHORT=1

  while ((opt = sgetopt_r((argc), ((char const *const *)argv), ("rRUV"), &subgetopt_here)) != -1) {
    switch(opt) {
    case 'r': lograw =1; break;
    case 'R': lograw =2; break;
    case 'U': noumask =1; break;
    case 'V':
      err("$Id: socklog.c,v 1.18 2004/06/26 09:36:25 pape Exp $", 0, 0);
      buffer_putsflush((&buffer_2_), "\n\n");

    case '?': usage();
    }
  }
  argv +=subgetopt_here.ind;

You can either define the define above, or instead of using optind, use subgetopt_here.ind directly...

support s6 readiness notification

As socklog is already forked to use skanet lib, an interesting feature would be adding s6 startup notification (-d fd) so we can wait for socklog before starting dependent services. For now run has to be patched to something like

#!/usr/bin/execlineb -P

fdmove -c 2 1
s6-notifyoncheck -c "s6-test -S /dev/log"
s6-envuidgid -D 32768:32768 nobody
socklog unix /dev/log

and create a /etc/services.d/socklog/notification-fd file with the content 3 which is not optimal

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.