9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] rc exec error behaviour
@ 2016-02-03  0:48 sl
  0 siblings, 0 replies; 28+ messages in thread
From: sl @ 2016-02-03  0:48 UTC (permalink / raw)
  To: 9fans

> Go 1.5.1 built and is running on 9Front/amd64 I thought, but doesn't on
> 9Front/386?

Sorry, my report was precisely backwards.


This is what I have on my
systems:

	dl; echo $cputype
	386
	dl; go version
	go version go1.4.2 plan9/386
	dl;


	fs; echo $cputype
	amd64
	fs; go version
	go version go1.5 plan9/amd64
	fs;

#go-plan9 is aware of the details and some investigation was done, but
work stalled out.

sl



^ permalink raw reply	[flat|nested] 28+ messages in thread
* [9fans] rc exec error behaviour
@ 2016-01-30 16:31 cinap_lenrek
  2016-01-31  1:16 ` Prof Brucee
  2016-02-22  0:19 ` erik quanstrom
  0 siblings, 2 replies; 28+ messages in thread
From: cinap_lenrek @ 2016-01-30 16:31 UTC (permalink / raw)
  To: 9fans

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



^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2016-02-22  0:19 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-03  0:48 [9fans] rc exec error behaviour sl
  -- strict thread matches above, loose matches on Subject: below --
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
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-02  4:16         ` Lyndon Nerenberg
2016-02-02  4:21           ` Prof Brucee
2016-02-02  4:24             ` Lyndon Nerenberg
2016-02-22  0:19 ` erik quanstrom

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).