Hi Garrett,
On Fri, 16 Jan 2009, Garrett Cooper wrote:
On Fri, Jan 16, 2009 at 12:58 AM, Garrett Cooper wrote:
On Fri, Jan 16, 2009 at 12:57 AM, Christoph Mallon
wrote:
Garrett Cooper schrieb:
Good point. I modified the source to do that.
Thanks,
-Garrett
You should reply to all so the
Garrett Cooper writes:
> #include
> #include
> #include
> #include
> #include
You should always put your sys includes before your non-sys includes,
and in any case, should always come first.
> printf("Errno: %d\n", errno);
> errx(errno, "Error: %s", strerror
On Fri, Jan 16, 2009 at 10:33:15AM -0800, Nate Eldredge wrote:
> Pop quiz: which of the following statements is correct?
>
> #include
> #include
>
> 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
execl("/bin/sh"
On Fri, 16 Jan 2009, Garrett Cooper wrote:
On Fri, Jan 16, 2009 at 2:52 AM, Thierry Herbelot
wrote:
Le Friday 16 January 2009, Garrett Cooper a écrit :
On Fri, Jan 16, 2009 at 2:21 AM, Christoph Mallon
#include
#include
#include
int
main()
{
struct stat sb;
int o_errno;
On Fri, Jan 16, 2009 at 2:52 AM, Thierry Herbelot
wrote:
> Le Friday 16 January 2009, Garrett Cooper a écrit :
>> On Fri, Jan 16, 2009 at 2:21 AM, Christoph Mallon
>>
>> #include
>> #include
>> #include
>>
>> int
>> main()
>> {
>>
>> struct stat sb;
>>
>> int o_errno;
>>
>>
Le Friday 16 January 2009, Garrett Cooper a écrit :
> On Fri, Jan 16, 2009 at 2:21 AM, Christoph Mallon
>
> #include
> #include
> #include
>
> int
> main()
> {
>
> struct stat sb;
>
> int o_errno;
>
> if (stat("/some/file/that/doesn't/exist", &sb) != 0) {
>
On Fri, Jan 16, 2009 at 01:33:38PM +0200, Danny Braniss wrote:
> some facts:
> #include
> 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
> > 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 th
Danny Braniss schrieb:
some facts:
#include
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 wrong goin
> 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
>
Garrett Cooper schrieb:
On Fri, Jan 16, 2009 at 2:21 AM, Christoph Mallon
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) {
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.
On Fri, Jan 16, 2009 at 2:35 AM, Garrett Cooper wrote:
> On Fri, Jan 16, 2009 at 2:21 AM, Christoph Mallon
> wrote:
>> Christian Kandeler schrieb:
>>>
>>> On Friday 16 January 2009 09:53, Christoph Mallon wrote:
>>>
> int
> main() {
>
>int mib[4];
>
>size_t
On Fri, Jan 16, 2009 at 2:21 AM, Christoph Mallon
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, &le
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", s
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:
Garrett Cooper schrieb:
On Fri, Jan 16, 2009 at 12:58 AM, Garrett Cooper wrote:
On Fri, Jan 16, 2009 at 12:57 AM, Christoph Mallon
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
On Fri, Jan 16, 2009 at 12:58 AM, Garrett Cooper wrote:
> On Fri, Jan 16, 2009 at 12:57 AM, Christoph Mallon
> 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.
>
> Ye
On Fri, Jan 16, 2009 at 10:44 AM, Garrett Cooper wrote:
> On Fri, Jan 16, 2009 at 12:41 AM, Garrett Cooper 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) wh
On Fri, Jan 16, 2009 at 12:57 AM, Christoph Mallon
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 interface!
-Garrett
_
On Fri, Jan 16, 2009 at 10:47 AM, Jacques Fourie
wrote:
> On Fri, Jan 16, 2009 at 10:44 AM, Garrett Cooper wrote:
>> On Fri, Jan 16, 2009 at 12:41 AM, Garrett Cooper wrote:
>>> Hi amd64 and Hackers,
>>>Uh, I'm really confused why 1) this error (errno => ENOMEM) would
>>> occur when I have mo
On Fri, 16 Jan 2009, 00:44-0800, Garrett Cooper wrote:
> On Fri, Jan 16, 2009 at 12:41 AM, Garrett Cooper 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)
On Fri, Jan 16, 2009 at 12:47 AM, Jacques Fourie
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 down. Now: what
about th
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 initializ
On Fri, Jan 16, 2009 at 12:41 AM, Garrett Cooper 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 the attached
>
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
26 matches
Mail list logo