[erlang-questions] managing OS processes
Ciprian Dorin Craciun
ciprian.craciun@REDACTED
Tue May 29 18:09:52 CEST 2012
On Tue, May 29, 2012 at 3:38 PM, Tim Watson <watson.timothy@REDACTED> wrote:
> Guys,
>
> The other problem I run into is, what about daemon/detached scripts, things
> launched using setsid/nohup and/or put straight into the background?
From my point of view such application -- i.e. that daemonize
themselves -- are broken to begin with and they live you with only
limited options:
* search another solution; (long live the open-source world;) :)
* fix the respective applications and submit patches upstream;
(again long live open-source, but unfortunately not everybody
understands why always daemonizing is a bad approach -- I've
encountered such cases...)
* use OS-specific tricks to force it to stay in foreground (i.e.
PID namespaces in Linux, etc.);
As such I don't see this as being the purpose of such a library.
> And how
> is your proxy program going to exhibit characteristics any different in this
> situation, where you cannot 'spawn' a sub-process (or whatever the windows
> equivalent is).
Again I don't see "not supporting Windows" as a big problem, because:
* most Erlang developers (that would need such process control
features) are educated enough to work in an UNIX compatible
environment;
* most serious Erlang deployments I guess live in an UNIX
compatible environment;
> Anyway, despite my reticence, I think your programs both sounds pretty
> useful - although I'm bemused that you'd use JSON serialization instead of
> simply using the ei interface
Unfortunately the `ei` interface is available (natively) only for
C/C++ and Erlang. But that leaves out things like Python and NodeJS
which are mandatory in my case. And I still find more easily looking
over JSON than over a binary message. (BTW I use the `packet` Erlang
message framing `4 bytes length + payload`.)
> - and I would also suggest that packaging them
> as separate libraries would be very useful to the community, giving others
> the benefit of utilising your work!
:) Yes but most of the time I doubt someone will actually use it.
That's why I've asked if someone wants to use it, I could extract it.
Ciprian.
More information about the erlang-questions
mailing list