Re: closing extra fd's in gnome_execute_*



Sorry, if you have received a similar message before, for me it appears
lost ...

Elliot Lee wrote:
> <snip>
> The problem occurs when a program that has many fd's open runs a shell
> script. configure scripts were given as examples of programs that use a
> lot of fd's and run shell scripts.
> 
> The issue is not really gnome_execute_*(). It is Manish trying to do bad,
> non-scalable hacks to work around bad bash brokenness ;-)
> 
> -- Elliot

Totally disagree. I don't consider broken a program (or script, or
whatever),
which expects nothing but fds 0, 1 and 2 open at startup. Nor I consider
broken a program which expects, say, only fds 17, 31, 96 open. This is a
part
of the program's environment, much as the requirement for certain
environment variables or command line arguments.

When spawning a program, the parent is responsible for setting the
environment in which the program executes. Think of spawning a program
with:
   a) random strings on the command line;
   b) random objects mapped into its address space;
   c:-) random file descriptors open.

Regards,
-velco



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]