lua-users home
lua-l archive

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


Has anybody worked out how to obtain the exit code from a sub-process
invoked using popen()?

It looks to me that the exit code is currently discarded b/c the
standard __close meta-method only returns a boolean.

Would it be possible to define an alternate close method (i.e.,
pclose()) which one could use to close a stream opened using popen() and
obtain the exit code from the sub-process?  Has this already been done?

thanks much,
John.