process erroneously shows up as from 1970

Review Request #2257 - Created Aug. 23, 2019 and submitted

Information
Jason King
illumos-gate
11606
Reviewers
general

process erroneously shows up as from 1970

To test, I used the following simple test:

#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <err.h>

int
main(void)
{
    daemon(0, 0);

    for (;;) {
        pid_t pid = fork();
        int status;

        switch (pid) {
        case (pid_t)-1:
            err(EXIT_FAILURE, "fork");
        case 0:
            wait(&status);
            break;
        default:
            sleep(1);
            return (0);
        }
    }

    return (0);
}

And ran as a service.
Without the change, after enabling the service, would run svcs -p|grep 1970 repeatedly and would see dates of 1970 regularly. With the change, I was never able to make the date show 1970.

Toomas Soome
Andrew Stormont
Jason King
Andy Fiddaman
Toomas Soome
Peter Tribble
Jason King
Review request changed

Status: Closed (submitted)

Loading...