/*
 * waste_time:
 *	Do nothing but let other things happen
 */
waste_time()
{
    do_daemons(BEFORE);
    do_fuses(BEFORE);
    do_daemons(AFTER);
    do_fuses(AFTER);
}
Example #2
0
/*
 * waste_time:
 *	Do nothing but let other things happen
 */
int waste_time()
{
  if (inwhgt) /* if from wghtchk, then done */
    return 0;
  do_daemons(BEFORE);
  do_daemons(AFTER);
  do_fuses();
  return 0;
}
int
restore(char *file)
{
    FILE *infd;
    char    *sp;

    if (strcmp(file, "-r") == 0)
        file = file_name;

    if ((infd = fopen(file, "r")) == NULL)
    {
        perror(file);
        return(FALSE);
    }

    if ( restore_file(infd) == FALSE )
        return(FALSE);

    /*
     * we do not close the file so that we will have a hold of the inode
     * for as long as possible
     */

    if (remove(file) < 0)
    {
        printf("Cannot unlink file\n");
        return(FALSE);
    }

    if ((sp = getenv("OPTIONS")) != NULL)
        parse_opts(sp);

    strcpy(file_name, file);

    clearok(cw, TRUE);
    touchwin(cw);
    noecho();
    nonl();

    while(playing)
    {
        do_daemons(BEFORE);
        do_fuses(BEFORE);

        command();  /* Command execution */

        if (after)
            do_after_effects();
    }

    fatal("");

    return(FALSE);
}