[fpc-devel] Re: inheriting handles using TProcess in unix

Seth Grover sethdgrover at gmail.com
Thu Jan 27 16:45:34 CET 2011


Marco said:

> It is not in all flavours, and many BSDs can turn it off.
> But that is more theoretical. The more practical problem is that while /proc
> might usually exist, its contents and permissions vary. (and that also goes
> for Linux, specially on embedded variants)
> If this really is an huge problem, I would add the possibility to trigger an
> event on the moment this is required. This allows for system specific
> operations by users, without unnecessarily complicating TProcess (and
> differentiate its default functionality per target, leading to
> documentation, maintenance and support issues)

Excellent idea. I've begun doing just as you suggested. Currently it
seems to me that this would be an "{$ifdef UNIX}" thing only in
process.pp. The reason I say this is that for the windows and wince
implementations of process.inc I don't see a place this event could be
triggered. The Windows API call CreateProcess is somewhat different
then UNIX's model of fork then exec, in between which I can trigger
the event so it happens in the context of the child process.

-SG

--
This email is fiction. Any resemblance to actual events
or persons living or dead is purely coincidental.

Seth Grover
sethdgrover[at]gmail[dot]com



More information about the fpc-devel mailing list