Re: mktemp(1) in /tmp or $PWD?

2010-02-25 Thread Doug Barton
On Thu, 25 Feb 2010, Garrett Cooper wrote: So what I did was I wrote up a patch to be *I know... here it comes* more like GNU coreutils' copy of mktemp. What's the motivation for this? I'm a little confused about why we'd want to change this when the -t option already exists. Also, does POSIX

Re: ddb and dump devices

2010-02-25 Thread Ryan Stone
I think a better idea would be to dump over the network to another server. We do that at $(WORK) for diskless machines and it's quite effective. Currently what we have is very rough and only implemented on 6.1, but if I get some time this weekend I'll try to clean it up and provide a patch agains

ddb and dump devices

2010-02-25 Thread Garrett Cooper
Hi again Hackers, Another question that popped up recently in my mind given some of the stability issues with RAID controllers is: what happens when you can't dump to a RAID or non-RAIDed PATA/SATA device? In particular, does it make sense to have the functionality where one could make the dump

Re: mktemp(1) in /tmp or $PWD?

2010-02-25 Thread Garrett Cooper
On Thu, Feb 25, 2010 at 6:50 PM, Garrett Cooper wrote: > Hi Hackers, >    Really basic question (because I'm relatively new to the Unix > scene -- only been using it for the last 10 years, so I don't know if > this was done for backwards compatibility with SysV) -- is mktemp(1) > without -t suppos

mktemp(1) in /tmp or $PWD?

2010-02-25 Thread Garrett Cooper
Hi Hackers, Really basic question (because I'm relatively new to the Unix scene -- only been using it for the last 10 years, so I don't know if this was done for backwards compatibility with SysV) -- is mktemp(1) without -t supposed to default to $PWD instead of /tmp if a template is specified,

Nasty bug in jn(3)

2010-02-25 Thread Steve Kargl
There's a nasty little bug lurking in jn(3). #include #include int main(void) { double z; int i, n; z = 2.4048255576957729; for (n = 2; n < 10; n++) printf("%d %e\n", n, jn(n,z)); return (0); } troutmask:kargl[446] cc -o z testjn.c -lm

Re: 2 bytes allocated problems

2010-02-25 Thread Max Laier
On Thursday 25 February 2010 23:46:03 Dag-Erling Smørgrav wrote: > "Matthias Andree" writes: > > Dag-Erling Smørgrav writes: > > > char a[9] = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i' }; > > > > char a[9] = "abcdefghi"; > > > > suffices. The compiler knows there isn't room for the terminal '

Re: 2 bytes allocated problems

2010-02-25 Thread Dag-Erling Smørgrav
"Matthias Andree" writes: > Dag-Erling Smørgrav writes: > > char a[9] = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i' }; > char a[9] = "abcdefghi"; > > suffices. The compiler knows there isn't room for the terminal '\0' > and omits it. Some compilers (gcc at least) warn about it. DES -- Dag-Er

RE: ntpd hangs under FBSD 8

2010-02-25 Thread Peter Steele
> We'll likely go with this solution instead of downgrading Python and the > related libraries. In fact I came up with another solution. I realized that since the problem was related to the process signal mask, instead of called ntpd directly, wrap it up in a C app that resets the signal mask t

Re: 2 bytes allocated problems

2010-02-25 Thread Matthias Andree
Am 24.02.2010, 20:55 Uhr, schrieb Dag-Erling Smørgrav : Why is there a 0 after the 'i'? Because when you write "abcdefghi", the compiler actually stores "abcdefghi\0". That's the definition of "string" in C: a sequence of characters immediately followed by a 0. If you don't want the 0 there,

32 bit Linux lseek missing overflow check (was: Re: Linuxolator patches: stat and lseek SEEK_END for disk devices)

2010-02-25 Thread Juergen Lock
On Tue, Feb 23, 2010 at 10:50:10PM +0100, Juergen Lock wrote: > Hi! > > Before this gets buried on -hackers in another thead... :) > > I now have disks appear as block devices for Linux processes (there > already was commented out code for that in linux_stats.c, I hope my > version is now `corr

debug libraries

2010-02-25 Thread Dr. Baud
Apologies if this is the wrong list Are there prepackaged debug versions of the system libraries available (like 'yum install *-debuginfo' in Fedora and 'apt-get install *-dbg' in Ubuntu)? Dr ___ freebsd-hackers@freebsd.org

Re: ntpd hangs under FBSD 8

2010-02-25 Thread Kostik Belousov
On Thu, Feb 25, 2010 at 09:57:48AM -0600, Peter Steele wrote: > >Very wild guess, check the process signal mask of the child for both methods > >of spawning. > > I'm running ntpd through Python. How do I check the process signal mask? I > did some quick searches and it seems Python does not supp

RE: ntpd hangs under FBSD 8

2010-02-25 Thread Peter Steele
>Very wild guess, check the process signal mask of the child for both methods >of spawning. I'm running ntpd through Python. How do I check the process signal mask? I did some quick searches and it seems Python does not support sigprocmask(). In my searches I came across this link: http://bug

Re: [Proof of Concept] Stacked unionfs based 'tinderbox'

2010-02-25 Thread David Naylor
On 25 February 2010 15:53, Ulrich Spörlein wrote: > On Thu, 25.02.2010 at 10:08:15 +0200, David Naylor wrote: >> Hi, >> >> As some may have noticed on -current I have been working on using >> stacked unionfs to implement a 'tinderbox' type build system.  I have >> successfully used the scripts to

Re: ntpd hangs under FBSD 8

2010-02-25 Thread Kostik Belousov
On Thu, Feb 25, 2010 at 08:12:05AM -0600, Peter Steele wrote: > >I think problem not in ntpd, since I use ntpdate. And in 50% times, when it > >run from startup script, it hangs with kernel. > >No Ctrl+C work, kernel don`t answer for ping, just freeze. > >Problem somewhere in kernel, maybe in subs

RE: ntpd hangs under FBSD 8

2010-02-25 Thread Peter Steele
>I think problem not in ntpd, since I use ntpdate. And in 50% times, when it >run from startup script, it hangs with kernel. >No Ctrl+C work, kernel don`t answer for ping, just freeze. >Problem somewhere in kernel, maybe in subsystems that set new time, maybe in >network(UDP) parts. >This problem

Re: ntpd hangs under FBSD 8

2010-02-25 Thread Dag-Erling Smørgrav
Alexey Shuvaev writes: > The flag you should look at is '-g'. GCC supports debuggind symbols > together with -O2 optimizations. It is generally not a good idea to use -O2 for debugging versions, since gcc will optimize away many local variables. DES -- Dag-Erling Smørgrav - d...@des.no

Re: ntpd hangs under FBSD 8

2010-02-25 Thread Alexey Shuvaev
On Wed, Feb 24, 2010 at 03:56:35PM -0600, Peter Steele wrote: > >> How do I get libc built with full debug symbols? > > > >I haven't tried it by myself but think here is the way to go: put the > >following to /etc/make.conf and recompile needed libraries / ports. > >WITH_DEBUG=yes > >DEBUG_FLAGS=

Re: [Proof of Concept] Stacked unionfs based 'tinderbox'

2010-02-25 Thread Ulrich Spörlein
On Thu, 25.02.2010 at 10:08:15 +0200, David Naylor wrote: > Hi, > > As some may have noticed on -current I have been working on using > stacked unionfs to implement a 'tinderbox' type build system. I have > successfully used the scripts to build x11/xorg (and have compared the > results to using

Re: ntpd hangs under FBSD 8

2010-02-25 Thread Alexandr Rybalko
On Wed, 24 Feb 2010 15:56:35 -0600 Peter Steele wrote: >> >> How do I get libc built with full debug symbols? >> > >> >I haven't tried it by myself but think here is the way to go: put the >> >following to /etc/make.conf and recompile needed >> >libraries / ports. WITH_DEBUG=yes >> >DEBUG_FLAGS

[Proof of Concept] Stacked unionfs based 'tinderbox'

2010-02-25 Thread David Naylor
Hi, As some may have noticed on -current I have been working on using stacked unionfs to implement a 'tinderbox' type build system. I have successfully used the scripts to build x11/xorg (and have compared the results to using the traditional approach using pkg_add). The build system is stable e