Garrett Cooper yanef...@gmail.com writes:
#include err.h
#include errno.h
#include stdio.h
#include sys/types.h
#include sys/sysctl.h
You should always put your sys includes before your non-sys includes,
and in any case, sys/types.h should always come first.
printf(Errno:
Hi Garrett,
On Fri, 16 Jan 2009, Garrett Cooper wrote:
On Fri, Jan 16, 2009 at 12:58 AM, Garrett Cooper yanef...@gmail.com wrote:
On Fri, Jan 16, 2009 at 12:57 AM, Christoph Mallon
christoph.mal...@gmx.de wrote:
Garrett Cooper schrieb:
Good point. I modified the source to do that.
Thanks,
Hi amd64 and Hackers,
Uh, I'm really confused why 1) this error (errno = ENOMEM) would
occur when I have more than enough free memory (both on x86 and amd64)
and 2) why strerror would segfault in the call to errx in the attached
sourcefile on amd64 only. Not initializing len causes the second
On Fri, Jan 16, 2009 at 12:41 AM, Garrett Cooper yanef...@gmail.com wrote:
Hi amd64 and Hackers,
Uh, I'm really confused why 1) this error (errno = ENOMEM) would
occur when I have more than enough free memory (both on x86 and amd64)
and 2) why strerror would segfault in the call to errx in
Garrett Cooper schrieb:
Hi amd64 and Hackers,
Uh, I'm really confused why 1) this error (errno = ENOMEM) would
occur when I have more than enough free memory (both on x86 and amd64)
and 2) why strerror would segfault in the call to errx in the attached
sourcefile on amd64 only. Not
On Fri, Jan 16, 2009 at 12:47 AM, Jacques Fourie
jacques.fou...@gmail.com wrote:
You need to initialize len to the number of entries in the mib array.
Try adding 'len = 4' before calling sysctlnametomib() and see if your
issues go away.
Ok, that solution works (I think). So, problem 2
On Fri, 16 Jan 2009, 00:44-0800, Garrett Cooper wrote:
On Fri, Jan 16, 2009 at 12:41 AM, Garrett Cooper yanef...@gmail.com wrote:
Hi amd64 and Hackers,
Uh, I'm really confused why 1) this error (errno = ENOMEM) would
occur when I have more than enough free memory (both on x86 and amd64)
On Fri, Jan 16, 2009 at 10:47 AM, Jacques Fourie
jacques.fou...@gmail.com wrote:
On Fri, Jan 16, 2009 at 10:44 AM, Garrett Cooper yanef...@gmail.com wrote:
On Fri, Jan 16, 2009 at 12:41 AM, Garrett Cooper yanef...@gmail.com wrote:
Hi amd64 and Hackers,
Uh, I'm really confused why 1) this
On Fri, Jan 16, 2009 at 12:57 AM, Christoph Mallon
christoph.mal...@gmx.de wrote:
Garrett Cooper schrieb:
Good point. I modified the source to do that.
Thanks,
-Garrett
You should reply to all so the discussion stays on the list.
Yeah, that was a goofup on my part. Go-go Gmail web
On Fri, Jan 16, 2009 at 10:44 AM, Garrett Cooper yanef...@gmail.com wrote:
On Fri, Jan 16, 2009 at 12:41 AM, Garrett Cooper yanef...@gmail.com wrote:
Hi amd64 and Hackers,
Uh, I'm really confused why 1) this error (errno = ENOMEM) would
occur when I have more than enough free memory (both
On Fri, Jan 16, 2009 at 12:58 AM, Garrett Cooper yanef...@gmail.com wrote:
On Fri, Jan 16, 2009 at 12:57 AM, Christoph Mallon
christoph.mal...@gmx.de wrote:
Garrett Cooper schrieb:
Good point. I modified the source to do that.
Thanks,
-Garrett
You should reply to all so the discussion
Garrett Cooper schrieb:
On Fri, Jan 16, 2009 at 12:58 AM, Garrett Cooper yanef...@gmail.com wrote:
On Fri, Jan 16, 2009 at 12:57 AM, Christoph Mallon
christoph.mal...@gmx.de wrote:
Garrett Cooper schrieb:
Good point. I modified the source to do that.
Thanks,
-Garrett
You should reply to all
On Friday 16 January 2009 09:53, Christoph Mallon wrote:
int
main() {
int mib[4];
size_t len;
if (sysctlnametomib(kern.ipc.shmmax, mib, len) != 0) {
printf(Errno: %d\n, errno);
errx(errno, Error: %s, strerror(errno));
Christian Kandeler schrieb:
On Friday 16 January 2009 09:53, Christoph Mallon wrote:
int
main() {
int mib[4];
size_t len;
if (sysctlnametomib(kern.ipc.shmmax, mib, len) != 0) {
printf(Errno: %d\n, errno);
errx(errno, Error: %s,
On Fri, Jan 16, 2009 at 2:21 AM, Christoph Mallon
christoph.mal...@gmx.de wrote:
Christian Kandeler schrieb:
On Friday 16 January 2009 09:53, Christoph Mallon wrote:
int
main() {
int mib[4];
size_t len;
if (sysctlnametomib(kern.ipc.shmmax, mib, len) != 0) {
On Fri, Jan 16, 2009 at 2:35 AM, Garrett Cooper yanef...@gmail.com wrote:
On Fri, Jan 16, 2009 at 2:21 AM, Christoph Mallon
christoph.mal...@gmx.de wrote:
Christian Kandeler schrieb:
On Friday 16 January 2009 09:53, Christoph Mallon wrote:
int
main() {
int mib[4];
size_t
Garrett Cooper schrieb:
Ok, I just installworld'ed, recompiled the program with the
following modifications, and I still get segfaults. And the question
of the night is: why amd64 on a VERY recent CURRENT?
I'm going to try the same app on an amd64 freebsd VMware instance
with RELENG_7.
Garrett Cooper schrieb:
On Fri, Jan 16, 2009 at 2:21 AM, Christoph Mallon
christoph.mal...@gmx.de wrote:
Christian Kandeler schrieb:
On Friday 16 January 2009 09:53, Christoph Mallon wrote:
int
main() {
int mib[4];
size_t len;
if (sysctlnametomib(kern.ipc.shmmax, mib,
Garrett Cooper schrieb:
Ok, I just installworld'ed, recompiled the program with the
following modifications, and I still get segfaults. And the question
of the night is: why amd64 on a VERY recent CURRENT?
I'm going to try the same app on an amd64 freebsd VMware instance
with
Danny Braniss schrieb:
some facts:
#include stdio.h
int
main()
{
printf(%s\n, strerror(2));
return 0;
}
1- it works fine on i386
2- it bombs on amd64
3- with a local strerror.c (instead of the one in libc)
works fine
so, there is something realy
On Fri, Jan 16, 2009 at 01:33:38PM +0200, Danny Braniss wrote:
some facts:
#include stdio.h
int
main()
{
printf(%s\n, strerror(2));
return 0;
}
1- it works fine on i386
2- it bombs on amd64
3- with a local strerror.c (instead of the one in libc)
On Fri, Jan 16, 2009 at 01:33:38PM +0200, Danny Braniss wrote:
some facts:
#include stdio.h
int
main()
{
printf(%s\n, strerror(2));
return 0;
}
1- it works fine on i386
2- it bombs on amd64
3- with a local strerror.c (instead of the one in libc)
Le Friday 16 January 2009, Garrett Cooper a écrit :
On Fri, Jan 16, 2009 at 2:21 AM, Christoph Mallon
#include errno.h
#include stdio.h
#include sys/stat.h
int
main()
{
struct stat sb;
int o_errno;
if (stat(/some/file/that/doesn't/exist, sb) != 0) {
On Fri, Jan 16, 2009 at 2:52 AM, Thierry Herbelot
thierry.herbe...@free.fr wrote:
Le Friday 16 January 2009, Garrett Cooper a écrit :
On Fri, Jan 16, 2009 at 2:21 AM, Christoph Mallon
#include errno.h
#include stdio.h
#include sys/stat.h
int
main()
{
struct stat sb;
On Fri, 16 Jan 2009, Garrett Cooper wrote:
On Fri, Jan 16, 2009 at 2:52 AM, Thierry Herbelot
thierry.herbe...@free.fr wrote:
Le Friday 16 January 2009, Garrett Cooper a écrit :
On Fri, Jan 16, 2009 at 2:21 AM, Christoph Mallon
#include errno.h
#include stdio.h
#include sys/stat.h
int
main()
On Fri, Jan 16, 2009 at 10:33:15AM -0800, Nate Eldredge wrote:
Pop quiz: which of the following statements is correct?
#include stdlib.h
#include unistd.h
execl(/bin/sh, /bin/sh, 0);
execl(/bin/sh, /bin/sh, NULL);
None, as NULL is allowed to expand to 0. You have to write
26 matches
Mail list logo