Coder Social home page Coder Social logo

openlaunchd's Introduction

Open Launchd

Mac OS X 10.4 Tiger introduced a new program called launchd. The daemon replaced SystemStarter (MacOS legacy) and older rc.d (BSD legacy) startup processes and job management functionality.

Launchd can be split into two logical pieces, "process 1", i.e. the root launchd which controls system startup and system daemons and "user launchd" which allows invividual users to manage their own processes/jobs.

Why?

The primary goal of this project is to port launchd in its entirety over to FreeBSD, hopefully making it usable by other BSD or Linux systems along the way. That said, the primary motivator for the original porting work in 2005 was to improve boot time. While improved boot time would be of tangible benefit to FreeBSD users, the current motivator of this project is to enable modern process management for user and system level processes on FreeBSD systems.

Getting involved:

Helpful links

  • The main project home page can be found on the FreeBSD project wiki.
  • rwatson@ runs fxr.watson.org which can be very useful for cross-referencing Apple system headers and code, with FreeBSD system headers and code

openlaunchd's People

Contributors

mauryloic avatar torstehu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openlaunchd's Issues

plist parsing code needed

Since launchd relies on CoreFoundation to parse its plist job configuration files, we'll need something to parse the plist files.

CF-lite exists, but is under the Apple Public Source License, so that is not desirable.

See src/core.c and man/launchd.plist.5 for more documentation

liblaunch needs to build before anything else

Before any further porting work on launchd or launchproxy is to continue, liblaunch is going to need to be tested and ported.

cc -O2 -pipe  -Werror -I/usr/home/tyler/source/github/launchd-for-freebsd/launchproxy/../src -I/usr/home/tyler/source/github/launchd-for-freebsd/launchproxy/../liblaunch -std=gnu99 -Qunused-arguments -fstack-protector   -o launchproxy launchproxy.o
launchproxy.o: In function `main':
launchproxy.c:(.text+0x39): undefined reference to `launch_data_alloc'
launchproxy.c:(.text+0x4d): undefined reference to `launch_data_set_string'
launchproxy.c:(.text+0x77): undefined reference to `launch_msg'
launchproxy.c:(.text+0x8b): undefined reference to `launch_data_free'
launchproxy.c:(.text+0x98): undefined reference to `launch_data_dict_lookup'
launchproxy.c:(.text+0xba): undefined reference to `launch_data_dict_lookup'
launchproxy.c:(.text+0xc7): undefined reference to `launch_data_get_integer'
launchproxy.c:(.text+0xdb): undefined reference to `launch_data_dict_lookup'
launchproxy.c:(.text+0xe8): undefined reference to `launch_data_get_string'
launchproxy.c:(.text+0xf8): undefined reference to `launch_data_dict_lookup'
launchproxy.c:(.text+0x111): undefined reference to `launch_data_dict_lookup'
launchproxy.c:(.text+0x11e): undefined reference to `launch_data_get_bool'
launchproxy.c:(.text+0x131): undefined reference to `launch_data_dict_lookup'
launchproxy.c:(.text+0x145): undefined reference to `launch_data_dict_lookup'
launchproxy.c:(.text+0x391): undefined reference to `launch_data_dict_lookup'
launchproxy.c:(.text+0x3a2): undefined reference to `launch_data_get_bool'
launchproxy.o: In function `find_fds':
launchproxy.c:(.text+0x4ff): undefined reference to `launch_data_get_type'
launchproxy.c:(.text+0x519): undefined reference to `launch_data_get_fd'
launchproxy.c:(.text+0x59d): undefined reference to `launch_data_dict_iterate'
launchproxy.c:(.text+0x5ac): undefined reference to `launch_data_array_get_count'
launchproxy.c:(.text+0x5c7): undefined reference to `launch_data_array_get_index'
launchproxy.c:(.text+0x5de): undefined reference to `launch_data_array_get_count'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1

Stop.
make[1]: stopped in /usr/home/tyler/source/github/launchd-for-freebsd/launchproxy
*** Error code 1

Is the project dead?

Hey there! It seems like the project had no activity at all since 2014, anything you guys can say about its status? Can it be used in the state it is right now?

Any plans to revive it?

Thanks!

vproc needs documenting

the vproc code inside of liblaunch could use a heavy dose of documentation to make it clearer what's needed on non-Apple OSes

Pull XPC code out of core.c into it's own object file

XPC is pretty intertwined in the core of what launchd is, almost 300 references to XPC symbols in launchd/*.c alone.

In order to avoid ifdef'ing the bejsus out of launchd/core.c, it probably makes a lot o fsense to parcel out the XPC specific code into its own object file.

NOTE: It might make sense to define an abstracted APi on top of XPC, to allow a DBus interface to be implemented for Linux-based systems.

uuid generation requires external library

Looks like Apple OSes uses a bundled version of e2fsprogs' libuuid to provide <uuid/uuid.h>

cc  -O2 -pipe  -Werror -g -I/usr/home/tyler/source/github/openlaunchd/liblaunch/../src -std=gnu99 -Qunused-arguments -fstack-protector  -c liblaunch.c -o liblaunch.o
In file included from liblaunch.c:23:
./launch_priv.h:28:10: error: 'launch.h' file not found with <angled> include; use "quotes" instead
#include <launch.h>
         ^~~~~~~~~~
         "launch.h"
./launch_priv.h:31:10: fatal error: 'uuid/uuid.h' file not found
#include <uuid/uuid.h>
         ^
2 errors generated.
*** Error code 1

Stop.
make[1]: stopped in /usr/home/tyler/source/github/openlaunchd/liblaunch
*** Error code 1

Stop.
make: stopped in /usr/home/tyler/source/github/openlaunchd

This should either be bundled into the openlaunchd tree, or enumerated as a dependency.

launchctl.c should be refactored

launchctl/launchctl.c is pretty giant (nearly 5k lines) and supports all the functionality necessary for the launchctl(1) command.

I think this should be refactored in to a couple different files as makes sense

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.