Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Commits on Apr 20, 2012
  1. Verify location is a directory before chdir()

    authored
    Also move some functionality around, we want to do as much as possible
    before (possibly) backgrounding, and definitely before we set up our
    services manager and start the default loop.
  2. Set up the libev default loop

    authored
    We set up the libev default loop using just a simple signal handler that
    waits for SIGINT so that a program can be exited neatly by stopping the
    loop.
  3. Add cmd line parameter to get version

    authored
    The version is retrieved by using git describe --always --long --dirty,
    which should give an accurate enough picture of which version is being
    built so that it becomes easier in the future to figure out which
    version is which.
  4. Don't throw on failure of ::stat

    authored
    If stat fails we simply return false, rather than throwing an error, we
    also clear any errno's that may have been set.
    
    We don't want to have to wrap is_dir(std::string) in try/catch's all
    over our code, especially since the return code is just supposed to tell
    us whether it is a directory or not!
  5. Add copy and assignment operators for dspawn::directory

    authored
    This adds the copy and assignment operators for dspawn::directory, the
    defaults would probably have been okay, but I prefer being explicit
    about it.
Commits on Nov 11, 2011
  1. Add required functionality to pass test

    authored
    This adds the required functionality required to pass one of the tests
    that was added in the previous commit!
  2. Add tests for directory functionality

    authored
    This starts adding some basic tests to check the sanity of the directory
    functionality/code.
  3. Move from make to scons

    authored
    I had been attempting to stick with make in an attempt to keep
    dependencies for building down to a minimum, however make was not nearly
    as flexible as I had hoped and was causing me to write so many extra
    entries that it was not worth my time and effort to continue to try
    bending make to my will.
    
    This also imports Google test into the tree and starts adding test
    cases.
Commits on Sep 6, 2011
  1. Add a couple of utility functions

    authored
    Added a couple of utility functions to the directory class that have to
    do with determining the path, basename, and the parent directory name of
    a certain directory.
  2. Parse struct dirent*

    authored
    We take the content of the struct dirent* and store it locally in
    variables that exist for the lifetime of the object rather than what may
    possibly be statically allocated memory.
    
    Also add in two operators, one to check if the two directory_entries are
    equal, the other to see if they are not equal (just calls the equality
    operator for its operation and negates it). This allows it to be used to
    see if two iterators are equal or not.
    
    The only two fields we pull out are the name and the file number, as
    those are the only two portable entries in a struct dirent*.
  3. Iterators are now returned by begin() and end()

    authored
    This also fixes a couple of issues:
    
    1. When we reached the end of a directory were were creating an empty
    directory_entry, which doesn't make sense since the end iterator has
    those set to 0's anyway and thus comparing a null ptr to an otherwise
    empty object doesn't make much sense.
    
    2. Fixes the operator!=, removes the old one that was created as a
    temporary place holder, and makes sure that proper checking is done for
    inequality.
  4. Add new errno exception class

    authored
    This captures the errno and then uses it as a message when it gets
    thrown this way we can start tracking when and where we are hitting
    error numbers.
    
    We may also want to start adding a way to get the error number
    along-side of the message like what() does so that we can check later
    down the exception handling chain what happened, although for now it is
    strictly for errors that can not be "handled" and probably should cause
    the app to crash or error out at least.
    
    This class is now used everywhere there were TODO's in directory.cc.
  5. Remove dependency on libev...

    authored
    As of right now we don't need libev, so remove it from the build so I
    don't have to keep installing the dependency each time I try to continue
    this project at a new workstation that doesn't have it installed.
Commits on Aug 31, 2011
  1. Start building up the iterators

    authored
    A lot of the difficult work has moved to the iterators, each time you
    create a new iterator it will do the opendir and keep track of where it
    is, rather than the base class. The base class has basically become an
    empty shell that checks that you are trying to look at a directory and
    then allows you to create iterators.
    
    The reason this was done is so that if you have multiple iterators to
    the same directory they don't keep overwriting each others results
    because of the way that opendir/readdir/seekdir/and others work.
    
    These itererators are kind of special though, there is no container
    backing them, so that means that each time you start from the beginning,
    you start from scratch with a completely new opendir/readdir cycle.
    Hopefully the OS caching the results will be enough.
  2. Start fleshing out directory_entry members

    authored
    This just starts fleshing out the required constructors for the
    directory_entry class.
  3. Create files specifically for directory_entry

    authored
    There is no reason why that should be included with the main directory
    code and why it couldn't be compiled as a seperate module.
    
    Hook it up to the build within the Makefile as well...
Commits on Aug 30, 2011
  1. Start of a wrapper around opendir and friends ...

    authored
    This wrapper is meant to wrap some of the functionality of opendir and
    friends. The reason why I want to wrap it is to provide iterators that
    make it easier to deal with directories which are going to playing a
    major part in the way services are going to be managed by dspawn.
Commits on Aug 25, 2011
  1. Add in backgrounding of the daemon and set up umask

    authored
    We set up the umask to be 0 so that any process we spawn will have to
    explicitly set their own, and we set up the daemon to be running within
    the service directory. This way so long as the daemon is running nobody
    can unmount the service directory out from under our nose.
  2. Add rudimentery options parsing

    authored
    Start with some very basic options parsing for the program. Add some
    simple defaults like -B and -d for backgrounding and increasing the
    debug level respectively. Also, we have one positional argument that is
    the service directory for where we are to start looking for services to
    start.
  3. Add license to the top of the main file

    authored
    This adds a license to the code in this file.
  4. Add new CXXFLAG: -g

    authored
    Compile with debugging enabled for now, will have to update this later
    on in the game ...
Commits on Aug 21, 2011
  1. Add Makefile to build dspawn.cc

    authored
    This adds a simple Makefile that will build dspawn.cc using the default
    compiler.
    
    As you can see this is all a little bit bare, it is the start of the
    project.
  2. Add AUTHORS

    authored
    This adds a new file to keep track of all of the authors that have had a
    hand in creating and building this project.
  3. README with basic description for dspawn

    authored
    A little information on what dspawn is, and what to compare it to as
    well as some information on the requirements for it to compile/run, and
    off course some information on what license it will be under (OpenBSD
    based license).
Something went wrong with that request. Please try again.