[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: popen problem with command line interpreter
- From: Tony Finch <dot@...>
- Date: Sun, 28 Feb 2010 01:08:42 +0000
On Sun, 28 Feb 2010, Rob Kendrick wrote:
> Tony Finch <email@example.com> wrote:
> > It would be wrong for Lua to trap SIGPIPE. Only the program knows if
> > that would be the right thing to do. SIGPIPE is not trapped by
> > detfault in C so it should not be by default in Lua.
> I'm only suggesting the command line interpreter might want to, not the
> library itself. (Simply so the command line interpreter can inform the
> user, rather than simply vanishing.)
If lua.c mucks around with signals, then io.popen() must somehow know it
needs to restore them to sanity in the child process (unless the Lua
program overrides lua.c's settings) which means lua's io.popen() cannot be
written in terms of C's popen(3).
Ugh, can of worms. Best to stick with the status quo.
f.anthony.n.finch <firstname.lastname@example.org> http://dotat.at/
GERMAN BIGHT HUMBER: SOUTHWEST 5 TO 7. MODERATE OR ROUGH. SQUALLY SHOWERS.
MODERATE OR GOOD.