I see. I'm using a remote script to poll a temp log file created by
the Capistrano logger and need a reliable way to know when it has
stopped the task/command. Do you think if I just create even handlers
that create and delete a file, that would work just as well? So if the
file is there the command is still running, if it's not there then
there isn't anything running? I'm worried about the case where a
Capistrano task (or parent process) may die, and not call the exit
event handler. Do you have any advice? :)

Matt

On Aug 2, 11:05 am, "Jamis Buck" <[EMAIL PROTECTED]> wrote:
> Do you mean, the process id of Capistrano itself, or the process id of
> the processes that Capistrano executes remotely?
>
> In the first case, the Ruby variable $$ will give you Capistrano's pid
> on the machine you are running Capistrano, In the latter case, no,
> Capistrano doesn't provide a means to grab the pid of an arbitrary
> process. Most programs that are meant to be run as a daemon support an
> option for writing the pid to a file, though.
>
> - Jamis
>
> On 8/2/07, goodieboy <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi,
>
> > I'm wondering if there is a way to get the current Capistrano process
> > id? I'm thinking about creating event handlers to create a pid file
> > before any task, and remove the file on exit. It'd be nice to actually
> > put the pid in there though. Is there a way to do this?
>
> > Thanks
> > Matt


--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---

Reply via email to