From: Skip Tavakkolian <skip.tavakkolian@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] rc exec error behaviour
Date: Sun, 31 Jan 2016 06:58:45 +0000 [thread overview]
Message-ID: <CAJSxfm+VAufXKfhS7Nv4xuOrhUUZHGB0JfNWQc-013OfUYrVvA@mail.gmail.com> (raw)
In-Reply-To: <CAJDwFdgO2PHK+Soa6CYGEBLMMC4KNA_uoXV6tAvS5KXGxOFNNw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]
Sign me up for testing.
On Sat, Jan 30, 2016, 5:16 PM Prof Brucee <prof.brucee@gmail.com> wrote:
> Any objections to me rewriting rc in go without all known bugs?
> On 31/01/2016 3:36 AM, <cinap_lenrek@felloff.net> wrote:
>
>> in the rc shell, when one has exec statement and the exec fails, rc tries
>> to
>> continue interpreting statements after the exec which fails with a strange
>> EOF error because in the process of preparing filedescriptors for exec,
>> the very fd thats used to read the script was closed.
>>
>> burnzez provided an example of this like:
>>
>> term% rc -c 'exec doesnotexist; echo test'
>> doesnotexist: './doesnotexist' directory entry not found
>> test
>> rc: /rc/lib/rcmain:29: token EOF: syntax error
>>
>> the manpage does not explicitely specify what should happen when exec
>> fails.
>>
>> i did try to have rc open the . script as OCEXEC and that fixed the
>> problem, but it wont work for any other redirections and will have side
>> effects
>> as the close-on-exec flag is a propery of the channel and not of the file
>> descriptor slot. so imagine stuff like . /fd/0...
>>
>> i think it would me most resonable to just have rc exit with error status
>> on
>> failure. are there any objections to this?
>>
>> --
>> cinap
>>
>>
[-- Attachment #2: Type: text/html, Size: 1802 bytes --]
next prev parent reply other threads:[~2016-01-31 6:58 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-30 16:31 cinap_lenrek
2016-01-31 1:16 ` Prof Brucee
2016-01-31 4:20 ` lucio
2016-01-31 6:58 ` Skip Tavakkolian [this message]
2016-02-01 0:52 ` Sean Hinchee
2016-02-01 4:06 ` erik quanstrom
2016-02-01 4:29 ` lucio
2016-02-01 17:01 ` Richard Miller
2016-02-01 18:35 ` lucio
2016-02-02 1:29 ` Prof Brucee
2016-02-02 10:53 ` Richard Miller
2016-02-02 12:36 ` Aram Hăvărneanu
2016-02-02 12:53 ` hiro
2016-02-02 13:23 ` David du Colombier
2016-02-02 15:46 ` lucio
2016-02-02 16:02 ` David du Colombier
2016-02-02 16:46 ` Skip Tavakkolian
2016-02-02 16:52 ` Skip Tavakkolian
2016-02-02 17:11 ` sl
2016-02-03 0:37 ` Sean Hinchee
2016-02-03 0:48 ` Kurt H Maier
2016-02-02 17:24 ` sl
2016-02-02 17:33 ` Wes Kussmaul
2016-02-01 20:33 ` [9fans] plan9/arm in Go 1.7? (was: rc exec error behaviour) Skip Tavakkolian
2016-02-01 20:45 ` David du Colombier
2016-02-02 4:16 ` [9fans] rc exec error behaviour Lyndon Nerenberg
2016-02-02 4:21 ` Prof Brucee
2016-02-02 4:24 ` Lyndon Nerenberg
2016-02-22 0:19 ` erik quanstrom
2016-02-03 0:48 sl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJSxfm+VAufXKfhS7Nv4xuOrhUUZHGB0JfNWQc-013OfUYrVvA@mail.gmail.com \
--to=skip.tavakkolian@gmail.com \
--cc=9fans@9fans.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).