[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: obtaining process exit code from popen()
- From: "John D. Blair" <jdb@...>
- Date: Mon, 08 Jun 2009 12:51:06 -0700
Its where I'm headed anyway, so I would appreciate seeing how you've
On Mon, 2009-06-08 at 15:48 -0400, Joseph Stewart wrote:
> I've hacked the use of pclose() in the standard libraries in the past
> to obtain this value... my implementation is crude but I could share
> the "recipe" with you if you're interested.
> On Mon, Jun 8, 2009 at 3:40 PM, John D. Blair<email@example.com> wrote:
> > On Sat, 2009-06-06 at 08:06 -0600, Joshua Jensen wrote:
> >> The process exit code is the return value from the process object's
> >> wait() function:
> >> exitcode = proc:wait()
> > I'm not sure I understand... popen() doesn't return a process object, it
> > returns a file handle. Also, I don't see wait() or a process object in
> > the lua docs anyplace. Is it part of an add-on module? I don't think
> > there's any concept of process in ANSI-C, which is what the un-adorned
> > lua interpreter targets.
> > -john.