Changeset e8747bd8 in mainline for uspace/srv/sysman/units/unit_svc.c


Ignore:
Timestamp:
2019-08-07T09:20:54Z (6 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Children:
2df7d824
Parents:
012dd8e
git-author:
Michal Koutný <xm.koutny+hos@…> (2015-11-01 15:43:57)
git-committer:
Matthieu Riolo <matthieu.riolo@…> (2019-08-07 09:20:54)
Message:

sysman: Use taskman API to detect successful server start

Conflicts:

uspace/srv/logger/main.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified uspace/srv/sysman/units/unit_svc.c

    r012dd8e re8747bd8  
    8585        assert(unit->state == STATE_STOPPED);
    8686
    87         int rc = task_spawnv(NULL, NULL, u_svc->exec_start.path,
     87        int rc = task_spawnv(&u_svc->main_task_id, NULL, u_svc->exec_start.path,
    8888            u_svc->exec_start.argv);
    8989
     
    9696
    9797        /*
    98          * This is temporary workaround, until proper reporting from brokers
    99          * about exposees will work. We assume the service succesfully starts
    100          * in a moment. Applies to naming service only.
    101          */
    102         if (str_cmp(unit->name, "devman.svc") == 0 ||
    103             str_cmp(unit->name, "logger.svc") == 0 ||
    104             str_cmp(unit->name, "irc.svc") == 0) {
    105                 async_usleep(100000);
    106                 unit->state = STATE_STARTED;
    107         }
    108 
    109         /*
    11098         * Workaround to see log output even after devman starts (and overrides
    11199         * kernel's frame buffer.
     100         * TODO move to task retval/exposee created handler
    112101         */
    113102        if (str_cmp(unit->name, "devman.svc") == 0) {
     
    128117        assert(unit->state == STATE_STOPPED || unit->state == STATE_STARTING || unit->state==STATE_STARTED);
    129118
    130         unit->state = STATE_STARTED;
    131         unit_notify_state(unit);
     119        /* Exposee itself doesn't represent started unit. */
     120        //unit->state = STATE_STARTED;
     121        //unit_notify_state(unit);
    132122}
    133123
Note: See TracChangeset for help on using the changeset viewer.