Re: macros: return or exit



"MG" == Marc Girod <marc.girod@xxxxxxxxx> writes:

MG> On Jan 21, 7:33 pm, "Uri Guttman" <u...@xxxxxxxxxxxxxxx> wrote:
>> not at all. when you fork, why not pass some flag to tell one of the
>> procs not to deal with the background process? in the other process,
>> close off the handles to that background process.

MG> Not to deal with the background process ?
MG> But what should it do then ?
MG> The whole purpose is to interface it !

MG> It could compute pi decimals, or have dinner.
MG> Once it has a fork...

i am lost as to the big picture now. i either need to read all the older
emails again or you need to explain your goals (and not your
design). you seem to want to run some binary process and manage its
i/o. why does this need to be in the background? what about a simple
fork of it and manage its i/o in an event loop in the parent? this is
fairly easy and there are modules that do all the hard lifting. if this
design isn't good enough explain why you need a more complex
architecture.

uri

--
Uri Guttman ------ uri@xxxxxxxxxxxxxxx -------- http://www.sysarch.com --
----- Perl Code Review , Architecture, Development, Training, Support ------
--------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------
.



Relevant Pages

  • Re: macros: return or exit
    ... >> i/o via its stdio. ... >> you want to run with its stdio. ... MG> If I fork part of my script, there will be two instances sharing the ... MG> same background process. ...
    (comp.lang.perl.misc)
  • Difference between daemon and background process
    ... Difference between daemon and background process? ... you can create a daemon you just call fork and ... exit the parrent. ...
    (comp.os.linux.development.apps)
  • Re: Problems reclaiming VM cache = XFree86 startup annoyance
    ... => significant reduction in swap I/O performance and/or be causing page ... => waiting for a memory allocation, which implies an I/O performance issue. ... The I/O-hogging background process is probably the btlaunchmany.py I ... run to serve several large filesets via BitTorrent. ...
    (freebsd-stable)