This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libgloss/arm: monitor_stderr [PATCH]


Hi Shaun,

2005-08-04 Shaun Jackman <sjackman@gmail.com>

	* libgloss/syscalls.c (initialise_monitor_handles): Set
	monitor_stdout to the result of SWI_open(":tt", "a")
	instead of simply duplicating stdout.

Assuming that nobody from the kernel world has a problem with this, then I would have no problem recommending that Jeff accepts it - with one proviso however:


+  block[0] = (int) ":tt";
+  block[2] = 3;     /* length of filename */
+  block[1] = 8;     /* mode "a" */
+  monitor_stderr = do_AngelSWI (AngelSWI_Reason_Open, (void *) block);

I think that you ought to add a comment to the code explaining the situation (ie opening the same file name with different modes in order to allow the kernel to choose whether to use one or two file descriptors). Otherwise future programmers might come along and think that this is a bug.


Cheers
  Nick



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]