tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joel Sather" <joel.sat...@csu.mnscu.edu>
Subject RE: Fw: Other question
Date Fri, 14 Jun 2002 14:48:44 GMT

Yeah, the function getppid() is a function built into Perl.

-Joel


Joel Sather
email: Joel.Sather@csu.mnscu.edu
phone: 651-917-4719

>>> JTurner@AAS.com 06/14/02 09:39AM >>>

getppid() is a library function, it should already be on your system.  It's
like printf(), gethostbyname(), etc.

John Turner
jturner@aas.com 
http://www.aas.com 


-----Original Message-----
From: Laura [mailto:lauradiara@libero.it] 
Sent: Friday, June 14, 2002 10:37 AM
To: Tomcat Users List
Subject: Re: Fw: Other question


Hi,

can you send me the function too?

The perl script can be the solution. 

Thanks


Laura

Alle 16:31, venerdì 14 giugno 2002, hai scritto:
> Hi ,
>
> excuse me, but the function getppid() ?
>
> What is this?
>
> Can you send me?
>
> Thanks a lot
>
> Laura
>
> Alle 16:20, venerdì 14 giugno 2002, hai scritto:
> > ----- Original Message -----
> > From: "Joel Sather" <joel.sather@csu.mnscu.edu>
> > To: <tomcat-user@jakarta.apache.org>
> > Sent: Friday, June 14, 2002 4:05 PM
> > Subject: Re: Other question
> >
> > > I tried to run Tim's  original sh script under Solaris and it wouldn't
> > > give me anything, so I wrote a version in Perl.  My script looks like
> > > this:
> > >
> > >
-----------------------------------------------------------------------
> > >-- -
> >
> > -----
> >
> > > #!/usr/local/bin/perl
> > >
> > > open (PIDFILE, "> logs/tomcat.pid");
> > > print PIDFILE getppid();
> > > close (PIDFILE);
> > >
-----------------------------------------------------------------------
> > >-- -
> >
> > ------
> >
> > > I also had to give fully qualified paths in both the Perl script and
in
> > > Runtime.getRuntime().exec() to get it to find the correct files.  Use
> > > the original Java class that Tim wrote and just point it to the Perl
> > > script.  Also, just call the Perl script--you don't need to call
> > > /bin/sh first.  Make sure to chmod the script to executable, too.
> > >
> > > Thanks for the Java code, Tim.  It works great now.
> > >
> > > -Joel
> > >
> > >
> > > Joel Sather
> > > email: Joel.Sather@csu.mnscu.edu 
> > > phone: 651-917-4719
> > >
> > > >>> funkman@joedog.org 06/14/02 07:26AM >>>
> > >
> > > Welcome to PID hell! I have this working on HPUX, if you are trying
> > > this
> > > on another UNIX - I'm not sure what may happen but here are some hints
> > >
> > > to track things down.
> > >
> > > 1) Make sure the directory you are starting tomcat you are typing
> > > bin/startup.sh. This ensures you will write the the correct log
> > > directory.
> > >
> > > 2) My original version of the script was:
> > > #!/bin/sh
> > > echo $PPID > logs/tomcat.pid
> > >
> > > This printed out the wrong PID since the first line created an extra
> > > shell process for the script to execute in. I wonder if
> > > Runtime.getRuntime().exec is creating "an extra process" which would
> > > cause you to get the wrong pid. If that is the case - I can't be of
> > > help. A Google search will probably provide a better solution than
mine
> > >
> > > for determining process id of a java program.
> > >
> > >
> > > -Tim
> > >
> > > Laura wrote:
> > > > Hi,
> > > >
> > > > I have installed your code in my Tomcat (4.0.2 + apache).
> > > >
> > > > But it doesn't seem to be correct. It writes in tomcat.pid a PID
that
> > >
> > > doesn't
> > >
> > > > seem to be correct: I have tried to do:
> > > >
> > > > kill -9 PID (which is in the tomcat.pid)
> > > >
> > > > and the system tells me:
> > > >
> > > >
> > > > bash: kill: (3977) - No such pid
> > > >
> > > >
> > > > Where is the problem?
> > > >
> > > >
> > > > Thanks
> > > >
> > > >
> > > > Laura
> > >
> > > --
> > > To unsubscribe, e-mail:
> > > <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> > > For additional commands, e-mail:
> > > <mailto:tomcat-user-help@jakarta.apache.org>
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> >
> > <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> >
> > > For additional commands, e-mail:
> >
> > <mailto:tomcat-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message