1 Apr 2003 06:50
Different behaviour of program
Ajay Bansal <Ajay_Bansal <at> infosys.com>
2003-04-01 04:50:14 GMT
2003-04-01 04:50:14 GMT
Hi All
Following program behaves differently on Solaris and Linux if we pass
SIGTERM (kill -15) or ^C (kill -2) to running program. I am using Sun
Workshop compiler on Solaris and gcc on Linux.
But I am not able to understand why!!!!!!!!!!!!!!!!!
TIA
Ajay
-------------------------------------------------------
/* This program illustrates pthread_kill( ). It can be used to send any
signal
to any thread from any other thread.If not caught, it will cause that
thread as well
as whole process to terminate. */
#include<iostream.h>
#include <pthread.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#define NTHREADS 4
pthread_t worker[NTHREADS];
pthread_t pid;
void smServerSignalHandler(int sig_num) {
(Continue reading)
19-Sep-82 11:44 Scott E Fahlman
RSS Feed