James Carlson wrote: > John Sonnenschein writes: > > I've tried the normal channel with no bites, seems people don't like > > doing CR ;) > > > > Anyhow, could I get a code review/sanity check on 6733971 from someone ? > > > > code at: > > http://cr.opensolaris.org/~error404/6733971/ > > Instead of introducing spaces -- which I think makes the code just a > little more obscure -- why not get rid of the superfluous parenthesis?
Good question... the answer is that we do not know exactly _why_ this stuff was originally added with subshells. It seems to be done intentionally but noone knows _why_. > In other words, instead of this: > > @( $(LHEAD) $(LINT.c) $< $(LTAIL) ) > > just do this: > > @$(LHEAD) $(LINT.c) $< $(LTAIL) > > That way, there's no question for future maintainers, and both forms > appear to be equivalent for ksh93. > > Are all these subshells doing us any good? As said above I tried to get an answer and so far the investigation was for /dev/null. My gut feeling says we should keep them. Options so far are: 1. Keep the patch in the current state and forward the investigation to the ToDo list of the OS/Net Janitor project 2. Keep the patch and ignore the extra brackets (they cause an extra |fork()| for the original Bourne shell but ksh93 does not |fork()| for subshells which will make this efectively a no-op) 3. Make a new patch and remove the extra brackets I would prefer [1] in this case since [3] would turn this patch IMO into a high-risk patch and [2] is IMO just reckless. ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) roland.mainz at nrubsig.org \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 3992797 (;O/ \/ \O;)
