[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: solaris and kill(pid, 0)
From: |
Oliver Jehle |
Subject: |
Re: solaris and kill(pid, 0) |
Date: |
23 Oct 2002 13:08:22 +0200 |
i found also the documentation ... so it should only be a makefile
change....
http://docs.sun.com/db/doc/801-6659/6i116aqn7?q=-D+_REENTRANT&a=view
On Wed, 2002-10-23 at 13:03, Oliver Jehle wrote:
> there is another option... after thinking about my old problems on
> solaris, there is a compiler flag you can set
>
> -D _REENTRANT to use the thread safe functions on solaris..
>
>
>
>
>
> On Wed, 2002-10-23 at 12:40, Jan-Henrik Haukeland wrote:
> > Christian Hopp <address@hidden> writes:
> >
> > > On 23 Oct 2002, Jan-Henrik Haukeland wrote:
> > >
> > > > Could this be a classic synchronization problem?
> > >
> > > Yep... I consulted google!
> > >
> > > Linux has a per-thread errno. (-: So we do not see any trouble there!
> >
> > There you go.
> >
> > > I substituted kill(foo)==0 by getpgid(bar)>0. That seems to work cuz
> > > it doesn't wake up anything. Tnx to Oliver for the hint.
> >
> > Yes, that should work, you have to use the same hack as with kill(0)
> > though in a check for a running process, i.e. but I guess I do not
> > have to say that :)
> >
> > if(getpgid(pid) == 0 || errno == EPERM)
> >
> >
> > > Solaris 7 doesn't have "thread specific errno". Hgrmph!
> >
> > Good thing Sun is starting to replace Solaris with Linux
> >
> >
> > > > [1] Aha, maybe the kill(0) signal on Solaris wakes up the monit daemon
> > > > in it's sleep phase. This sounds plausible and then you will have a
> > > > race condition on which thread sets errno. One soulution could be to
> > > > mask out the 0 signal if possible at all in a signal(0, SIG_IGN) ?
> > >
> > > Don't know, we simply don't use kill anymore. (-:
> >
> > Thinking twice about it I'm pretty sure this is the reason, especially
> > if it works now :)
> >
> >
> > --
> > Jan-Henrik Haukeland
> >
> >
> > _______________________________________________
> > monit-dev mailing list
> > address@hidden
> > http://mail.nongnu.org/mailman/listinfo/monit-dev
> --
> Oliver Jehle
> Monex AG
> Föhrenweg 18
> FL-9496 Balzers
>
> Tel: +423 388 1988
> Fax: +423 388 1980
>
> ----
> I've not lost my mind. It's backed up on tape somewhere.
> ----
>
>
>
> _______________________________________________
> monit-dev mailing list
> address@hidden
> http://mail.nongnu.org/mailman/listinfo/monit-dev
--
Oliver Jehle
Monex AG
Föhrenweg 18
FL-9496 Balzers
Tel: +423 388 1988
Fax: +423 388 1980
----
I've not lost my mind. It's backed up on tape somewhere.
----
- solaris and kill(pid, 0), Christian Hopp, 2002/10/23
- Re: solaris and kill(pid, 0), Oliver Jehle, 2002/10/23
- Re: solaris and kill(pid, 0), Jan-Henrik Haukeland, 2002/10/23
- Re: solaris and kill(pid, 0), Christian Hopp, 2002/10/23
- Re: solaris and kill(pid, 0), Christian Hopp, 2002/10/23
- Re: solaris and kill(pid, 0), Jan-Henrik Haukeland, 2002/10/23
- Re: solaris and kill(pid, 0), Oliver Jehle, 2002/10/23
- Re: solaris and kill(pid, 0),
Oliver Jehle <=
- Re: solaris and kill(pid, 0), Jan-Henrik Haukeland, 2002/10/23