Skip to content
  • Mike Hibler's avatar
    Don't know if this is a BSD linuxthread thing or just a pthread semantic, · e25ef575
    Mike Hibler authored
    but if the child thread calls exit(-1) from fatal, the frisbee process
    exits, but with a code of zero; i.e., the child exit code is lost.
    Granted, a multi-threaded program should not be calling exit willy-nilly,
    but it does so we deal with it as follows.
    
    Since the child should never exit during normal operation (we always
    kill it), if it does exit we know there is a problem.  So, we catch
    all exits and if it is the child, we set a flag.  The parent thread
    will see this and exit with an error.
    
    Since I don't understand this fully, I am making it a FreeBSD-only
    thing for now.
    e25ef575