[Vala] Vala: Signal from POSIX



Hello,

I dont know if this is the right place to ask questions regarding vala. But
anyway, ill post the question here just in case someone has the same
experience i had while working with vala using signal from posix.

Code:

public class Check{
  ...
  public int x = 0;

  public open(){
    ...
    signal(SIGUSR1, sighandler);
  }
  ...
  public void sighandler(int signum) {
    stdout.printf("%d", x++);
  }
  ...
}

How do we make our signal handlers access the global variables?
i write a similar code in C, but works okay there.

PS. any good forum site? ty.

ierosvin


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