operating system services itimer_virtualand sigprof is generated for itimer_prof set seconds to to clear timer returns tuple (secondsintervalwith the previous settings of the timer siginterrupt(signalnumflagsets the system call restart behavior for given signal number if flag is falsesystem calls interrupted by signal signalnum will be automatically restarted if set truethe system call will be interrupted an interrupted system call will typically result in an oserror or ioerror exception where the associated error number is set to errno eintr or errno eagain signal(signalnumhandlersets signal handler for signal signalnum to the function handler handler must be callable python object taking two argumentsthe signal number and frame object sig_ign or sig_dfl can also be given to ignore signal or use the default signal handlerrespectively the return value is the previous signal handlersig_ignor sig_dfl when threads are enabledthis function can only be called from the main thread otherwisea valueerror exception is raised individual signals are identified using symbolic constants of the form sigthese names correspond to integer values that are machine-specific typical values are as followssignal name description sigabrt sigalrm sigbus sigchld sigcld sigcont sigfpe sighup sigill sigint sigio sigiot sigkill sigpipe sigpoll sigprof sigpwr abnormal termination alarm bus error change in child status change in child status continue floating-point error hang up illegal instruction terminal interrupt character asynchronous / hardware fault terminate write to pipeno readers pollable event profiling alarm power failure terminal quit character segmentation fault stop termination hardware fault terminal stop character control tty sigquit sigsegv sigstop sigterm sigtrap sigtstp sigttin lib fl ff