[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Kernel 2.6.26-2-486 Błąd Kernela?



Mam problem w w/w kernelem na squeeze i nie potrafięwskazać innej przyczyny niżbłąd kernela.

Możliwe, iżpopełniam jakiś błąd.

Najprostsza wersja testu:

skrypt wywołuje w pętli:

 

date

a następnie sleep 1

 

zawiesza się system

 

odpalony na kilku konsolach  przyspiesza zwis

 

 

do testu w bash-u doszedłem od wywołania systemowego zmiany czasu i od settimeofday

 

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <iostream>
#include <signal.h>
#include <sys/time.h>
#include <errno.h>
using namespace std;

int main(int argc, char** argv) {
    char command[35];
    int ret=0,i=0;
    while (true)
    {
/*
        sprintf (command, "date --set=\"%s\"", "04/27/2010 10:14:55");
        cout << command << "\n";
        ret = system(command);
    if (WIFSIGNALED(ret) &&(WTERMSIG(ret) == SIGINT || WTERMSIG(ret) == SIGQUIT))
    {
        printf("System command error\n");
        break;
        }
    else
    {
        printf("System command ok\n");
    }
    i++;
    printf("i=%d\n",i);
    sleep(1);
*/

   
    time_t secs;

    secs = time(NULL);
    struct timeval tv;
    tv.tv_sec = secs;
    tv.tv_usec = 0;   

    if(settimeofday(&tv,NULL)==0)
    {
     printf("System command ok\n");
    }
    else
    {
     printf("System command error\n");
     printf("Error %d\n",errno);
         break;
    }
        i++;
        printf("i=%d\n",i);
        sleep(1);
    }
    return (EXIT_SUCCESS);
}

 

Czy ktoś sięspotkał z tym problemem?

 

 

Arkadiusz Krysiak.

 

 

 

 

 



Reply to: