Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion managing OS processes
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Tim Watson  
View profile  
 More options May 26 2012, 4:52 pm
From: Tim Watson <watson.timo...@gmail.com>
Date: Sat, 26 May 2012 21:52:32 +0100
Local: Sat, May 26 2012 4:52 pm
Subject: Re: [erlang-questions] managing OS processes
I'm also working on very similar requirements in
https://github.com/nebularis/systest/blob/master/src/systest_cli.erl
and like you two, I have to rely on a combination of open_port with
its constituent events and os:cmd/1 in order to SIGHUP/SIGKILL which
feels rather 'hackish' to me. I've also noticed that it makes consumer
code rather timing dependent, which is frustrating.

I would be willing to participate in either

(a) improving the built in port functionality or
(b) working on erlexec

Although C I'm fairly comfortable with, but C++ (which erlexec appears
to be written in) isn't really my bag. I do have to ask though, is
erlexec in need of much additional work? I also have 'client' modules
for the OTP slave and ssh modules and don't want to invest a mountain
of time in replacing open_port, but a little TLC to bring erlexec up
to scratch would be time well spent if it would give a more consistent
interface. In particular I have some issues with open_port based code
with now such as

1. cli clients my code launches can be 'detached' (usually erlang
nodes run with -detached or scripts that launch erlang nodes using `sh
-C` or setsid/nohup and the like), which makes the port handling code
both complex and messy.
2. some client code I'm testing will execute another (different)
script/command to shut down the node and the listening port doesn't
always get the exit status properly
3. signal handling is a mess

So erlexec does sound promising, but IMO it would be *better* if the
built in open_port functionality could be extending to deal with these
situations properly.

Cheers,
Tim

On 26 May 2012 13:12, Gleb Peregud <glebe...@gmail.com> wrote:

> On Sat, May 26, 2012 at 11:06 AM, Benoit Chesneau <bchesn...@gmail.com> wrote:
>> I'm trying to find a way to manage some os processes launched from
>> Erlang. For example I need to relaunch them when the external process
>> die for an unknown reason or send an HUP signal or just stop the
>> external process.

> Hello Benoit

> Looks like there are two of us, who needs a better mechanism to manage
> OS processes from Erlang. I need it for a CI server which I'm working
> on, so my requirements are not as high as yours, but still os:cmd
> doesn't work for me and ports are missing one feature which I need.

> Maybe we could reanimate erlexec together?

> Cheers,
> Gleb
> _______________________________________________
> erlang-questions mailing list
> erlang-questi...@erlang.org
> http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.