The *pclose*() function waits for the associated process to terminate and
returns the exit status of the command

On Feb 5, 2008 1:30 AM, Axton <[EMAIL PROTECTED]> wrote:

> popen looks to be available on all platforms (posix compliant and
> windows).  Windows defines the function as _popen though.
>
> http://msdn2.microsoft.com/en-us/library/96ayss4b(VS.80).aspx<http://msdn2.microsoft.com/en-us/library/96ayss4b%28VS.80%29.aspx>
>
> I wrote a filter plugin that executes ping via popen and returns the
> output, but it provides no more functionality or simplicity than
> running ping from a set fields process.  What I can't figure out how
> to get is the exit code from ping when run via popen; only stdout.
>
> Axton Grams
>
> On Feb 4, 2008 3:25 PM, William H. Will Du Chene <[EMAIL PROTECTED]>
> wrote:
> > Either way, there was no getting around it. It's a de facto standard
> that
> > a child process inherits the same level of permissions - and the profile
> -
> > of whatever the parent process is. Without that behavior on the
> platform,
> > we would really have issues.
> >
> > Axton made an excellent catch and I am grateful for it. Knowing that
> there
> > are alternative functions out there which can be used is a very good
> > thing.
> >
> > I didn't read the page close enough, so I am curious to know if these
> > functions are present on all platforms. Many of the open source
> > applications which I have had to tear apart and rewrite components of -
> > such as HtDig - make use of popen to process the results from the sort
> > utility that it uses.
> >
> > Unfortunately, implementations very here and there and this is something
> > that I ran into when I ported the search engine over to windows.
> >
> >
> > >
> > > Basically all that says is whatever is run under popen runs as the
> > > caller. In this case ARS, which should not have those privileges - and
> > > if they are running as root they deserve all they get :-) Calling
> > > something that uses popen from ARS is no better or worse than invoking
> > > any other command with a run process.
> > >
> >
> > --
> >
> >
> > Will Du Chene
> > [EMAIL PROTECTED]
> > http://www.myspace.com/wduchene
> >
> >
> _______________________________________________________________________________
> >
> >
> >
> > UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
> > Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"
> >
>
>
> _______________________________________________________________________________
> UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
> Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"
>

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"

Reply via email to