I'm not sure ( I didn't look closely at the code), but calling an IO function while handling an IO signal might be a problem. Also, when printing within signals, it's a good idea to call flush().
One could also print to the stderr stream instead of stdout, since stderr never needs flush.
I am thankful for this site and for the many links provided. I have been going through one of the tutorials, but as I try some things, they don't seem to work.
I am wondering if there is something I need first before being able to use a tutorial (like version number (HP-UX) or how I am getting... (1 Reply)
Hi all.
I have a script as below:
cutmth=`TZ=CST+2160 date +%b`
export cutmth
echo $cutmth >> date.log
sed -n "/$cutmth/$p" alert_sbdev1.log > alert_summ.log
My purpose is to run through the alert_sbdev1.log and find the 1st occurence of 'Jan' and send everything after that line to... (4 Replies)
Following code is detecting solaris daytime,when I run it,I can't get any result,code is follows:
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define BUFFSIZE 150
int main(){
... (2 Replies)
I use Solaris 10, I use following code:
#include <signal.h>
int main(void){
printf("----------testing-----------");
if(signal(SIGUSR1,sig_usr)==SIG_ERR)
err_sys("can't catch SIGUSR1");
for(;;)
pause();
sig_user(int signo){
.....
}
when I run above code,it print nothing... (3 Replies)
hey all, im a new programmer.
i was wondering how you would go about writing the printf function yourself? it is my understanding that when you call printf you are calling an already written function and just providing an argument? if this is the case, is it possible to write that function... (8 Replies)
Hello all!
I have problem in hp-ux 11.11 in awk
I want to grep sar -d 2 1 only 3 column, but have error in awk in hp-ux 11.11
Example:
#echo 123 234 | awk '{print $2}'
123 234
The situattions in commands bdf | awk {print $5}' some...
In hp-ux 11.31 - OK!
How resolve problem (15 Replies)
Hello:
I can't get equivalence classes to work in globs or when passing them to tr. If I understood correctly, matches e, é, è, ê, etc. But when using them with utilities like tr they don't work. Here's an example found in the POSIX standard:
I decided to create the aforementioned files in... (9 Replies)
Discussion started by: Cacializ
9 Replies
LEARN ABOUT DEBIAN
signal
signal(3tcl)signal(3tcl)NAME
signal - dynamically loadable signal handling for Tcl/Tk
SYNOPSIS
signal (add|delete|print|version) [options]
COMMANDS
add signo proc [-async]
Adds a signal handler for signal signo through proc proc. Signals can be provided by number, or the most common ones are provided by name
(e.g., SIGHUP). The proc is any Tcl procedure, and it is evaluated when the signal comes in. It will be provided no arguments.
Signal handlers have Posix semantics - they persist until reset.
If -async is used, the signal handler is created using Tcl_AsyncCreate(). Checks for the signal are very frequent (each evaluation) using
this technique, but one doesn't know quite where evaluation is or how to handle errors in this situation. The code will evaluate the pro-
vided procedure in the current interpreter if available, and in the interpreter which added the signal handler otherwise. At least until a
better scheme is suggested.
The -async is especially useful to interrupt "runaway" procs, or to cause a quick exit; the default mechanism simply waits for another
MainLoop cycle.
signal delete signo
Restores handling of signal signo to the default ( SIG_DFL ).
signal print
Prints the handling of all signals with handlers. Formatted as
signal ----> procedure or as
signal !---> procedure
if the signal is handled asynchronously
signal print signo
Prints the procedure for handling signal signo. Prints the word UNHANDLED if no signal handler is active for that signal.
signal version
Returns the string representing the current version of the package
AUTHOR
Michael Schwartz <mschwart@nyx.net>. Tilman Kranz <tilde@tk-sls.de> patched this for wider portability on Linux
Tcl Signal Extension 1.4.0.1 Tcl signal(3tcl)