INNER CODE UNIT · C

buf

clover-moe/spearmint · code/autoupdater/autoupdater.c:974

    buf = (char *) alloca(len);
    if (!buf) {
        outOfMemory();
    }

    memcpy(buf, argv0, len);
    buf[len] = '\0';
    if (chdir(buf) == -1) {
        infof("base path is '%s'", buf);
        die("chdir to base path failed");
    }
}

int main(int argc, char **argv)
{
    #ifndef _WIN32
    signal(SIGPIPE, SIG_IGN);  /* don't trigger signal when fd3 closes */
    #endif

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…