[erlang-questions] How do I capture the system pid of an OTP application?

Bob Ippolito <>
Sat May 5 04:03:57 CEST 2012


On Fri, May 4, 2012 at 7:00 PM, Parnell Springmeyer <>wrote:

> I have an OTP application and a release generated. Now, the problem I'm
> having is capturing the operating system level PID that it is assigned
> on startup.
>
> Using pgrep isn't very useful because the process is listed as
> "[beam.smp]" and there are more than one OTP applications running on
> this system!


Well, there's os:getpid/0, you could write a pid file with that... or you
could run the process it in the foreground and manage the process with
something like daemontools, launchd, etc.

-bob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120504/b96b97eb/attachment.html>


More information about the erlang-questions mailing list