Re: fgetc doubts

2009-03-11 Thread Václav Haisman
Gábor Kövesdán wrote, On 10.3.2009 22:33: Hello, I have a problem when reading files with fgetc when a 0xff character comes. In my code the reading stops at that point as if EOF had been reached, but that's not actually the case. The code is here:

Re: fgetc doubts

2009-03-11 Thread Václav Haisman
Gábor Kövesdán wrote, On 10.3.2009 22:33: Hello, [...] And the problem occurs in grep_fgetln() when the buffers is being filled in: for (; i bufsiz !grep_feof(f); i++) binbuf[i] = grep_fgetc(f); Also, why are you filling the buffer char by char? All of the input

Re: Debugging init process.

2009-03-11 Thread Alexander Leidinger
Quoting Nate Eldredge neldre...@math.ucsd.edu (from Tue, 10 Mar 2009 19:02:16 -0700 (PDT)): On Tue, 10 Mar 2009, vasanth raonaik wrote: Hello Team, I need to debug init process. I am not able to attach init to gdb and it throws As others mentioned, this is explicitly disabled. You could

Re: [PATCH] Support for thresholds in du(1)

2009-03-11 Thread Ed Schouten
* Mel fbsd.hack...@rachie.is-a-geek.net wrote: Example usage: # du -xht 20m . 29M./contrib/binutils 52M./contrib/gcc 237M./contrib 35M./crypto 28M./lib 20M./share 55M./sys/dev 139M./sys 545M. Ooh! That looks awesome! -- Ed Schouten

Re: Debugging init process.

2009-03-11 Thread Robert Watson
On Tue, 10 Mar 2009, Nate Eldredge wrote: On Tue, 10 Mar 2009, vasanth raonaik wrote: I need to debug init process. I am not able to attach init to gdb and it throws As others mentioned, this is explicitly disabled. You could re-enable it by hacking the kernel, but it could cause other

Non-existing p_vmspace. When is it possible?

2009-03-11 Thread pluknet
Hi. I perform in FOREACH_PROC_IN_SYSTEM(), where I conditionally look at p_vmspace internals. I'd like to know the safe way to reference p_vmspace fields without potential null-dereference. I see an example in vm_pageout_oom(), where making access to p-p_vmspace fields is done without additional

Re: Non-existing p_vmspace. When is it possible?

2009-03-11 Thread Kostik Belousov
On Wed, Mar 11, 2009 at 04:38:39PM +0300, pluknet wrote: Hi. I perform in FOREACH_PROC_IN_SYSTEM(), where I conditionally look at p_vmspace internals. I'd like to know the safe way to reference p_vmspace fields without potential null-dereference. I see an example in vm_pageout_oom(),

Re: Debugging init process.

2009-03-11 Thread Marius Nünnerich
On Wed, Mar 11, 2009 at 08:51, Alexander Leidinger alexan...@leidinger.net wrote: Quoting Nate Eldredge neldre...@math.ucsd.edu (from Tue, 10 Mar 2009 19:02:16 -0700 (PDT)): On Tue, 10 Mar 2009, vasanth raonaik wrote: Hello Team, I need to debug init process. I am not able to attach init