Re: [PATCH] server: if a debugger is attached to a process, child processes shouldn't get debugged (resend)
On Sat, Oct 8, 2011 at 10:05 AM, David Laight wrote: > On Fri, Oct 07, 2011 at 08:32:27PM +0200, Marcus Meissner wrote: >> On Fri, Oct 07, 2011 at 11:44:24AM +0900, Dmitry Timoshkov wrote: >> > Bernhard Loos wrote: >> > >> > > + int debug_childs:1; /* also debug all child >> > > processes */ >> > >> > 'debug_children' would be a better name. >> >> also >> unsigned int foo:1; >> please. (int foo:1 works, but is semidefined only ;) > > Why the bitfield anyway? > Unless you are allocating a lot of copies of the structure > it is likely to generate more code than the saved memory. Actually, the generated code is pretty much exactly the same size or even smaller for one function. Also, it makes it clear that this is a boolean flag. > David > > -- > David Laight: da...@l8s.co.uk >
Re: [PATCH] server: if a debugger is attached to a process, child processes shouldn't get debugged (resend)
On Fri, Oct 07, 2011 at 08:32:27PM +0200, Marcus Meissner wrote: > On Fri, Oct 07, 2011 at 11:44:24AM +0900, Dmitry Timoshkov wrote: > > Bernhard Loos wrote: > > > > > +int debug_childs:1; /* also debug all child > > > processes */ > > > > 'debug_children' would be a better name. > > also > unsigned intfoo:1; > please. (int foo:1 works, but is semidefined only ;) Why the bitfield anyway? Unless you are allocating a lot of copies of the structure it is likely to generate more code than the saved memory. David -- David Laight: da...@l8s.co.uk
Re: [PATCH] server: if a debugger is attached to a process, child processes shouldn't get debugged (resend)
On Fri, Oct 07, 2011 at 11:44:24AM +0900, Dmitry Timoshkov wrote: > Bernhard Loos wrote: > > > +int debug_childs:1; /* also debug all child > > processes */ > > 'debug_children' would be a better name. also unsigned intfoo:1; please. (int foo:1 works, but is semidefined only ;) Ciao, Marcus
Re: [PATCH] server: if a debugger is attached to a process, child processes shouldn't get debugged (resend)
Bernhard Loos wrote: > +int debug_childs:1; /* also debug all child processes > */ 'debug_children' would be a better name. -- Dmitry.