- To: Jason Tishler <Jason dot Tishler at dothill dot com>
- Subject: Re: [PORTS] (Cygwin) postmaster shutdown problem
- From: Yutaka tanida <yutaka at hi-net dot zaq dot ne dot jp>
- Date: Fri, 19 Jan 2001 21:19:34 +0900
- Cc: pgsql-ports at postgresql dot org
- References: <20010115230456.4812.YUTAKA@hi-net.zaq.ne.jp> <20010118082914.B1092@dothill.com>
Jason,
> On Mon, Jan 15, 2001 at 11:42:13PM +0900, Yutaka tanida wrote:
> > > > Sorry , I have a mistake.
> > > I'm not sure that I understand your above comment. Does it mean that your
> > > patch has a mistake in it?
> >
> > Oh, my mistake is that attached patch can'tfix this problem. It fixes
> > some problem on PostgreSQL , but can't fix it.
>
> Are you still attempting to fix this problem? Please do not interpret
> this as a request. I will understand if you do not want or have time to
> continue with this effort. I just need to know whether or not I should
> start to debug myself.
Today, I'm working on this and finally create a patch against cygwin
1.1.7 . This patch fixes PostgreSQL's problem , but attatched C program
doesn't work correctly.
---
Yutaka tanida<yutaka@hi-net.zaq.ne.jp>
---- testsig.c
#include<signal.h>
#include<unistd.h>
#include<stdio.h>
#include<errno.h>
void recvsig(int);
static sigset_t unblock,block,old;
int main() {
int pid=getpid();
int pid2=-1;
int i=0,k=0;
char buffer[8];
signal(SIGUSR1,recvsig);
signal(SIGUSR2,recvsig);
sigfillset(&block);
sigemptyset(&unblock);
sigprocmask(SIG_SETMASK,&block,&old);
for(k=0;k<10;k++) {
kill(pid,SIGUSR1);
}
sleep(2);
for(i=0;i<10;i++) {
sigprocmask(SIG_SETMASK,&unblock,&old);
sleep(0);
kill(pid,SIGUSR2); //comment this!
}
}
void recvsig(int sig) {
switch(sig) {
case SIGUSR1:
printf("SIGUSR1\n");
break;
case SIGUSR2:
printf("SIGUSR2\n");
break;
default:
printf("UNKNOWN\n");
break;
}
usleep(100000);
}
signalfix.diff