Skip to content

Instantly share code, notes, and snippets.

@ngerakines
Created July 23, 2009 22:17
Show Gist options
  • Select an option

  • Save ngerakines/153681 to your computer and use it in GitHub Desktop.

Select an option

Save ngerakines/153681 to your computer and use it in GitHub Desktop.
erl -pidfile this_file -eval '(fun ([N]) -> {ok, F}=file:open(N,[write]),io:format(F,"~s~n",[os:getpid()]),file:close(F),ok; (_) -> nok end)(proplists:get_value(pidfile, init:get_arguments()))' -s init stop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment