Re: (Cygwin) postmaster shutdown problem

From: Yutaka tanida <yutaka(at)hi-net(dot)zaq(dot)ne(dot)jp>
To: Jason Tishler <Jason(dot)Tishler(at)dothill(dot)com>
Cc: pgsql-ports(at)postgresql(dot)org
Subject: Re: (Cygwin) postmaster shutdown problem
Date: 2001-01-19 12:19:34
Message-ID: 20010119210905.2797.YUTAKA@hi-net.zaq.ne.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-ports

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(at)hi-net(dot)zaq(dot)ne(dot)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);
}

Attachment Content-Type Size
signalfix.diff application/octet-stream 909 bytes

In response to

Responses

Browse pgsql-ports by date

  From Date Subject
Next Message Magnus Hagander 2001-01-19 13:46:28 RE: libpq and Visual C++
Previous Message Gerhard Häring 2001-01-19 09:25:12 Re: libpq and Visual C++