From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Mon, 14 Feb 2011 01:03:45 -0500 To: 9fans@9fans.net Message-ID: <781726dc6db5b2735c3d62e92d46c44d@chula.quanstro.net> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Subject: Re: [9fans] ratrace problem; debuggers welcome Topicbox-Message-UUID: ae0c3f0e-ead6-11e9-9d60-3106f5b1d025 > > at least from the source i have, writing to p->hang after > > the fork isn't going to do anything.  p->hang is only consulted > > in sysexec.  i think you need to add the same test in sysfork. > > It is only supposed to be consulted in sysexec. Hang just means that > the next exec will result in a stop, not the fork. You really only > want to look for the hang when exec is called. In fact the parent can > call exec -- even before a fork -- and the child will halt in the > exec. Very handy. i thought traced programs were supposed to hang on every sys call. and i think that Proc->procctl is not copied into the forked process. what am i missing? > > it turns out that printing "." instead of the character for > > non-ascii is unworkable for some things. > > I made a bad mistake there. Let's pick some sort of standard format > and go with it. > > Here's my suggestion. Non-printable characters will be printed as \xx > where xx is the hex code. '\' is considered a non-printable character > because we don't want to get confused. Does that work for people? that doesn't really work for me. either the kernel should always print as hex, or the decision should be made for the whole string. the \x notation requires that any \x be excaped. you potentially need to escape both " and \. it's a difficult and non-standard quoting scheme for plan 9. if you think the kernel really needs to be making a decision based on utf-8/not utf-8 (not 7-bit ascii!), i would think the most standard way of formatting this would be nil, %.*q or %.*H. - erik