Changeset ed5367b in mainline for uspace/srv/sysman/job.c


Ignore:
Timestamp:
2019-08-07T10:01:13Z (5 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Children:
a097c50
Parents:
68ae40a
git-author:
Michal Koutný <xm.koutny+hos@…> (2015-11-05 01:52:07)
git-committer:
Matthieu Riolo <matthieu.riolo@…> (2019-08-07 10:01:13)
Message:

sysman: Implement stopping units

Currently fails service monitoring because of taskman flawed event flags.
However, job closure works well.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/sysman/job.c

    r68ae40a red5367b  
    199199
    200200        int rc;
     201        // TODO put here similar evaluation as in job_check
     202        //      goal is to have job_run "idempotent"
    201203        switch (job->target_state) {
    202204        case STATE_STARTED:
    203                 // TODO put here same evaluation as in job_check
    204                 //      goal is to have job_run "idempotent"
    205205                if (u->state == job->target_state) {
    206206                        rc = EOK;
     
    209209                }
    210210                break;
     211        case STATE_STOPPED:
     212                if (u->state == job->target_state) {
     213                        rc = EOK;
     214                } else {
     215                        rc = unit_stop(u);
     216                }
     217                break;
    211218        default:
    212                 // TODO implement other states
     219                // TODO implement other states?
    213220                assert(false);
    214221        }
Note: See TracChangeset for help on using the changeset viewer.