Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Feb 1995 04:39:30 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        freebsd-hackers@freefall.cdrom.com, kargl@troutmask.apl.washington.edu
Subject:   Re: tar dumps core on 950112-SNAP
Message-ID:  <199501311739.EAA27602@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>Simple question: should tar dump core if it tries to
>access /proc where /proc is, of course, mounted as a
>procfs?

No.  I think /proc is still buggy.  Regular files in it
are irregular.  Some are irregular enough to confuse tar.

BTW, for `cd /proc; wc */*', wc gives up immediately
after not being able to read the first file (0/ctl).

>I am going to start to sup the -current tree, so I 
>wanted to backup my entire system.  I cd to / and
>simply issued `tar cvf /dev/rst0 .i >& tar.log &'.  The system
>barfed on /proc. If /proc is unmounted the tar executes
>as expected.  The following error message is printed
>to the console.

You have to skip /proc somehow.  I use a regexp to weed out
junk in "/" (most mount points, but not /usr).

>One minor problem: Some programs include the following lines:

>#include <stdio.h>
>int foo() {
>   extern char *sys_errlist[];
>....
>}

>FreeBSD-2.[01].x declares

>extern __const char *__const sys_errlist[];
                      ^^it doesn't have this bit probably should

>in stdio.h.  gcc complains about the redeclaration, then halts
>compilation. I modified the sources to read

>#include <stdio.h>
>#include <sys/param.h>
>int foo() {
>#if BSD < 199303
>   extern char *sys_errlist[];
>#endif
>....
>}

>Is this the proper way to handle the problem?

Not really.  It works for one system, but for 100 systems that have
sys_errlist it generalizes to a 100-line ifdef, and then there are
systems that don't have sys_errlist but have strerror()...

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199501311739.EAA27602>