Giter VIP home page Giter VIP logo

Comments (4)

msoap avatar msoap commented on August 11, 2024

Hi, sorry for delay.
I want to keep the server as simple as possible, and not be tied to the features of the two launch systems (systemd and launchd). And there is no single standard for "socket activation".

About privileged ports, on Mac OS you can use any free port including the privileged one, just try shell2http -port 80 /d date. On Linux you can use CAP_NET_BIND_SERVICE capabilities, see stackoverflow.com and man capabilities

from shell2http.

srd424 avatar srd424 commented on August 11, 2024

It looks like systemd socket activation supports an inetd-compatible mode, which would avoid requirement to link with anything odd or add systemd-specific code. Would that be more acceptable? I guess it might not work with some advanced HTTP features but presumably they're not particularly important for shell2http anyway...

From systemd.socket(5):

Note that the daemon software configured for socket activation with socket units needs to be able to accept sockets from systemd, either via systemd's native socket passing interface (see sd_listen_fds(3) for details) or via the traditional inetd(8)-style socket passing (i.e. sockets passed in via standard input and output, using StandardInput=socket in the service file).

from shell2http.

srd424 avatar srd424 commented on August 11, 2024

And according to https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html:

There are four ways to launch daemons using launchd. The preferred method is on-demand launching, but launchd can launch daemons that run continuously, and can replace inetdfor launching inetd-style daemons. In addition, launchd can start jobs at timed intervals.

from shell2http.

msoap avatar msoap commented on August 11, 2024

This is interesting about inetd-style, where the socket is passed as stdin/stdout. I need to investigate this and try to make an experiment.

from shell2http.

Related Issues (20)

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.